From 34fde6bd11a6a908de01d3ba33e04ce01543c25f Mon Sep 17 00:00:00 2001 From: Christian Fowler Date: Fri, 17 Feb 2006 23:49:56 +0000 Subject: rename column size to file_size, remove redundant indices that cause errors on install --- plugins/storage.bitfile.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/storage.bitfile.php') 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 @@ 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 ) ); } -- cgit v1.3