Ignore:
Timestamp:
Dec 17, 2011, 7:14:43 PM (9 years ago)
Author:
patdenice
Message:

Delete cache automaticaly if height or margin has changed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GThumb/admin.php

    r12733 r12758  
    7070  }
    7171
     72  if ($params['height'] != $conf['GThumb']['height'])
     73  {
     74    gtdeltree(GTHUMB_CACHE_DIR);
     75  }
     76  elseif ($params['margin'] != $conf['GThumb']['margin'])
     77  {
     78    gtdeltree(GTHUMB_CACHE_DIR.'/'.($conf['GThumb']['height'] * 2 + $conf['GThumb']['margin']));
     79  }
     80
    7281  if (empty($page['errors']))
    7382  {
Note: See TracChangeset for help on using the changeset viewer.