diff options
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.admin.inc | 8 | ||||
-rw-r--r-- | modules/system/system.install | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index c3f7e05b2..1cde4be2b 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -338,9 +338,9 @@ function system_theme_settings(&$form_state, $key = '') { // The image was saved using file_save_upload() and was added to the // files table as a temporary file. We'll make a copy and let the garbage // collector delete the original upload. - if (file_copy($file, $filename, FILE_EXISTS_REPLACE)) { + if ($filepath = file_copy($file->filepath, $filename, FILE_EXISTS_REPLACE)) { $_POST['default_logo'] = 0; - $_POST['logo_path'] = $file->filepath; + $_POST['logo_path'] = $filepath; $_POST['toggle_logo'] = 1; } } @@ -353,9 +353,9 @@ function system_theme_settings(&$form_state, $key = '') { // The image was saved using file_save_upload() and was added to the // files table as a temporary file. We'll make a copy and let the garbage // collector delete the original upload. - if (file_copy($file, $filename)) { + if ($filepath = file_copy($file->filepath, $filename, FILE_EXISTS_REPLACE)) { $_POST['default_favicon'] = 0; - $_POST['favicon_path'] = $file->filepath; + $_POST['favicon_path'] = $filepath; $_POST['toggle_favicon'] = 1; } } diff --git a/modules/system/system.install b/modules/system/system.install index e133d55ec..af2ceab33 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -629,7 +629,7 @@ function system_schema() { 'description' => t('Stores information for uploaded files.'), 'fields' => array( 'fid' => array( - 'description' => t('Primary Key: Unique files ID.'), + 'description' => t('File ID.'), 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, @@ -642,7 +642,7 @@ function system_schema() { 'default' => 0, ), 'filename' => array( - 'description' => t('Name of the file.'), + 'description' => t('Name of the file with no path components. This may differ from the basename of the filepath if the file is renamed to avoid overwriting an existing file.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, @@ -656,7 +656,7 @@ function system_schema() { 'default' => '', ), 'filemime' => array( - 'description' => t('The file MIME type.'), + 'description' => t("The file's MIME type."), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, @@ -670,7 +670,7 @@ function system_schema() { 'default' => 0, ), 'status' => array( - 'description' => t('A flag indicating whether file is temporary (1) or permanent (0).'), + 'description' => t('A bitmapped field indicating the status of the file the least sigifigant bit indicates temporary (1) or permanent (0). Temporary files older than DRUPAL_MAXIMUM_TEMP_FILE_AGE will be removed during a cron run.'), 'type' => 'int', 'not null' => TRUE, 'default' => 0, |