diff options
author | rvelices <rv-github@modusoptimus.com> | 2012-02-02 20:59:41 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2012-02-02 20:59:41 +0000 |
commit | 18036a70fcee8e372b6b8d98fbe8a61a3685798f (patch) | |
tree | 5f81c65b42dd992c878ef49ea94da23673fbd808 /admin/include/functions.php | |
parent | a68826cbb3ad9b09edc6c13a63923b4e827f918f (diff) |
feature 2548 multisize - custom sizes restricted to those requested by theme/plugin
code refacto
git-svn-id: http://piwigo.org/svn/trunk@13021 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/include/functions.php | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php index 8b455f077..6344d705f 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -202,15 +202,18 @@ SELECT } $ok = true; - foreach ($files as $path) - { - if (is_file($path) and !unlink($path)) - { - $ok = false; - trigger_error('"'.$path.'" cannot be removed', E_USER_WARNING); - break; - } - } + if (!isset($conf['never_delete_originals'])) + { + foreach ($files as $path) + { + if (is_file($path) and !unlink($path)) + { + $ok = false; + trigger_error('"'.$path.'" cannot be removed', E_USER_WARNING); + break; + } + } + } if ($ok) { |