diff options
| author | Christian Fowler <spider@viovio.com> | 2006-02-17 23:49:56 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2006-02-17 23:49:56 +0000 |
| commit | 34fde6bd11a6a908de01d3ba33e04ce01543c25f (patch) | |
| tree | ec0e990945808cf0fe1e42494a629f606e7ce98c /plugins/storage.bitfile.php | |
| parent | 950ca2d838596dcb9ba9d06aea73f3f4c3d430b1 (diff) | |
| download | liberty-34fde6bd11a6a908de01d3ba33e04ce01543c25f.tar.gz liberty-34fde6bd11a6a908de01d3ba33e04ce01543c25f.tar.bz2 liberty-34fde6bd11a6a908de01d3ba33e04ce01543c25f.zip | |
rename column size to file_size, remove redundant indices that cause errors on install
Diffstat (limited to 'plugins/storage.bitfile.php')
| -rw-r--r-- | plugins/storage.bitfile.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/storage.bitfile.php b/plugins/storage.bitfile.php index 8203cfe..067fb6b 100644 --- a/plugins/storage.bitfile.php +++ b/plugins/storage.bitfile.php @@ -1,6 +1,6 @@ <?php /** - * @version $Revision: 1.13 $ + * @version $Revision: 1.14 $ * @package liberty * @subpackage plugins_storage */ @@ -43,11 +43,11 @@ function bit_files_store( &$pStoreRow ) { $pref = $gBitSystem->getPreference('centralized_upload_dir'); if( isset( $pref ) ) { if( !empty( $pStoreRow['foreign_id'] ) ) { - $sql = "UPDATE `".BIT_DB_PREFIX."liberty_files SET `storage_path`=?, `mime_type`=?, `size`=? WHERE `file_id` = ?"; + $sql = "UPDATE `".BIT_DB_PREFIX."liberty_files SET `storage_path`=?, `mime_type`=?, `file_size`=? WHERE `file_id` = ?"; $gBitSystem->mDb->query( $sql, array( $pStoreRow['dest_file_path'], $pStoreRow['type'], $pStoreRow['size'], $pStoreRow['foreign_id'] ) ); } else { $pStoreRow['file_id'] = $gBitSystem->mDb->GenID( 'liberty_files_id_seq' ); - $sql = "INSERT INTO `".BIT_DB_PREFIX."liberty_files` ( `storage_path`, `file_id`, `mime_type`, `size`, `user_id` ) VALUES ( ?, ?, ?, ?, ? )"; + $sql = "INSERT INTO `".BIT_DB_PREFIX."liberty_files` ( `storage_path`, `file_id`, `mime_type`, `file_size`, `user_id` ) VALUES ( ?, ?, ?, ?, ? )"; $userId = !empty( $pStoreRow['upload']['user_id'] ) ? $pStoreRow['upload']['user_id'] : $gBitUser->mUserId; $gBitSystem->mDb->query($sql, array( $pStoreRow['upload']['dest_path'].$pStoreRow['upload']['name'], $pStoreRow['file_id'], $pStoreRow['upload']['type'], $pStoreRow['upload']['size'], $userId ) ); } |
