Ignore:
Timestamp:
Feb 2, 2012, 9:59:41 PM (12 years ago)
Author:
rvelices
Message:

feature 2548 multisize - custom sizes restricted to those requested by theme/plugin
code refacto

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions.php

    r13013 r13021  
    203203
    204204    $ok = true;
    205     foreach ($files as $path)
    206     {
    207       if (is_file($path) and !unlink($path))
    208       {
    209         $ok = false;
    210         trigger_error('"'.$path.'" cannot be removed', E_USER_WARNING);
    211         break;
    212       }
    213     }
     205                if (!isset($conf['never_delete_originals']))
     206                {
     207                        foreach ($files as $path)
     208                        {
     209                                if (is_file($path) and !unlink($path))
     210                                {
     211                                        $ok = false;
     212                                        trigger_error('"'.$path.'" cannot be removed', E_USER_WARNING);
     213                                        break;
     214                                }
     215                        }
     216                }
    214217
    215218    if ($ok)
Note: See TracChangeset for help on using the changeset viewer.