Ignore:
Timestamp:
Feb 7, 2012, 10:25:20 PM (12 years ago)
Author:
rvelices
Message:

upgrade jquery to 1.7.1
mouseout on index drop down bozes
improved multisize center of interest

File:
1 edited

Legend:

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

    r13025 r13052  
    203203
    204204    $ok = true;
    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                 }
     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    }
    217217
    218218    if ($ok)
     
    23072307}
    23082308
    2309 function delete_element_derivatives($infos)
     2309function delete_element_derivatives($infos, $type='all')
    23102310{
    23112311  $path = $infos['path'];
     
    23182318    $path = substr($path, 3);
    23192319  }
    2320   $dot = strpos($path, '.');
    2321   $path = substr_replace($path, '-*', $dot, 0);
     2320  $dot = strrpos($path, '.');
     2321  if ($type=='all')
     2322  {
     2323    $pattern = '-*';
     2324  }
     2325  else
     2326  {
     2327    $pattern = '-'.derivative_to_url($type).'*';
     2328  }
     2329  $path = substr_replace($path, $pattern, $dot, 0);
    23222330  foreach( glob(PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$path) as $file)
    23232331  {
Note: See TracChangeset for help on using the changeset viewer.