diff options
Diffstat (limited to 'admin')
-rw-r--r-- | admin/maintenance.php | 10 | ||||
-rw-r--r-- | admin/themes/default/template/maintenance.tpl | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/admin/maintenance.php b/admin/maintenance.php index c8547a118..78c4d0a7d 100644 --- a/admin/maintenance.php +++ b/admin/maintenance.php @@ -142,7 +142,7 @@ DELETE } case 'derivatives': { - clear_derivative_cache(); + clear_derivative_cache($_GET['type']); break; } default : @@ -159,6 +159,12 @@ $template->set_filenames(array('maintenance'=>'maintenance.tpl')); $url_format = get_root_url().'admin.php?page=maintenance&action=%s&pwg_token='.get_pwg_token(); +$purge_urls[l10n('all')] = sprintf($url_format, 'derivatives').'&type=all'; +foreach(ImageStdParams::get_defined_type_map() as $params) +{ + $purge_urls[ l10n($params->type) ] = sprintf($url_format, 'derivatives').'&type='.$params->type; +} + $template->assign( array( 'U_MAINT_CATEGORIES' => sprintf($url_format, 'categories'), @@ -173,10 +179,12 @@ $template->assign( 'U_MAINT_SEARCH' => sprintf($url_format, 'search'), 'U_MAINT_COMPILED_TEMPLATES' => sprintf($url_format, 'compiled-templates'), 'U_MAINT_DERIVATIVES' => sprintf($url_format, 'derivatives'), + 'purge_derivatives' => $purge_urls, 'U_HELP' => get_root_url().'admin/popuphelp.php?page=maintenance', ) ); + if ($conf['gallery_locked']) { $template->assign( diff --git a/admin/themes/default/template/maintenance.tpl b/admin/themes/default/template/maintenance.tpl index a7e0112a9..f55d10d2e 100644 --- a/admin/themes/default/template/maintenance.tpl +++ b/admin/themes/default/template/maintenance.tpl @@ -34,5 +34,7 @@ <li><a href="{$U_MAINT_FEEDS}">{'Purge never used notification feeds'|@translate}</a></li> <li><a href="{$U_MAINT_SEARCH}"onclick="return confirm('{'Purge search history'|@translate|@escape:'javascript'}');">{'Purge search history'|@translate}</a></li> <li><a href="{$U_MAINT_COMPILED_TEMPLATES}">{'Purge compiled templates'|@translate}</a></li> - <li><a href="{$U_MAINT_DERIVATIVES}">{'Purge derivative image cache'|@translate}</a></li> + <li>{'Purge derivative image cache'|@translate}: + {foreach from=$purge_derivatives key=name item=url name=loop}{if !$smarty.foreach.loop.first}, {/if}<a href="{$url}">{$name}</a>{/foreach} + </li> </ul> |