summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2008-10-09 00:02:29 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2008-10-09 00:02:29 +0000
commitf841d1a764c4aa6aa6d2a58daa401be615f4e873 (patch)
treeeac1b6d3c4325d926f06e036a337746d03edb9fc /modules/system
parent72e09d7beb7788a3a1f473c0d7a7a4802a5dc75a (diff)
downloadbrdo-f841d1a764c4aa6aa6d2a58daa401be615f4e873.tar.gz
brdo-f841d1a764c4aa6aa6d2a58daa401be615f4e873.tar.bz2
#142995 by dopry, drewish, quicksketch, jpetso, and flobruit: Adding hook_file_X(). This is an enabler of lots and lots of goodies. See CHANGELOG.txt for more. Awesome work, guys. :)
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.admin.inc4
-rw-r--r--modules/system/system.module2
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index fead5c2fc..9ef4fcf45 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -338,7 +338,7 @@ 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 ($filepath = file_copy($file->filepath, $filename, FILE_EXISTS_REPLACE)) {
+ if ($filepath = file_unmanaged_copy($file->filepath, $filename, FILE_EXISTS_REPLACE)) {
$_POST['default_logo'] = 0;
$_POST['logo_path'] = $filepath;
$_POST['toggle_logo'] = 1;
@@ -353,7 +353,7 @@ 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 ($filepath = file_copy($file->filepath, $filename, FILE_EXISTS_REPLACE)) {
+ if ($filepath = file_unmanaged_copy($file->filepath, $filename, FILE_EXISTS_REPLACE)) {
$_POST['default_favicon'] = 0;
$_POST['favicon_path'] = $filepath;
$_POST['toggle_favicon'] = 1;
diff --git a/modules/system/system.module b/modules/system/system.module
index e4d9abea0..8f533b20f 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -1405,7 +1405,7 @@ function system_cron() {
if (file_exists($file->filepath)) {
// If files that exist cannot be deleted, continue so the database remains
// consistent.
- if (!file_delete($file->filepath)) {
+ if (!file_delete($file)) {
watchdog('file system', 'Could not delete temporary file "%path" during garbage collection', array('%path' => $file->filepath), WATCHDOG_ERROR);
continue;
}