Changeset 17651


Ignore:
Timestamp:
Aug 27, 2012, 8:43:05 PM (8 years ago)
Author:
rvelices
Message:

merge -r17650 from trunk to branch 2.4 bug 2730: multi size not deleted when physical directory deleted

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4/admin/site_update.php

    r13527 r17651  
    304304
    305305  // to delete categories
    306   $to_delete = array();
     306  $to_delete = array(); $to_delete_derivative_dirs = array();
    307307  foreach (array_diff(array_keys($db_fulldirs), $fs_fulldirs) as $fulldir)
    308308  {
     
    311311    array_push($infos, array('path' => $fulldir,
    312312                             'info' => l10n('deleted')));
     313    if (substr_compare($fulldir, '../', 0, 3)==0)
     314    {
     315      $fulldir = substr($fulldir, 3);
     316    }
     317    $to_delete_derivative_dirs[] = PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$fulldir;
    313318  }
    314319  if (count($to_delete) > 0)
     
    317322    {
    318323      delete_categories($to_delete);
     324      foreach($to_delete_derivative_dirs as $to_delete_dir)
     325      {
     326        if (is_dir($to_delete_dir))
     327        {
     328          clear_derivative_cache_rec($to_delete_dir, '#.+#');
     329        }
     330      }
    319331    }
    320332    $counts['del_categories'] = count($to_delete);
Note: See TracChangeset for help on using the changeset viewer.