aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/include/functions.php')
-rw-r--r--admin/include/functions.php21
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)
{