Permalink
Browse files

Admin->Theme->Settings: delete theme cache for specific module

  • Loading branch information...
1 parent 5acda71 commit 9d6365b76ea87937cba6eb865f036f68c0ba5765 @nmpetkov committed Mar 29, 2012
@@ -1238,7 +1238,13 @@ public function clear_cache()
}
$theme = Zikula_View_Theme::getInstance();
- $res = $theme->clear_all_cache();
+
+ $cacheid = FormUtil::getPassedValue('cacheid');
+ if ($cacheid) {
+ $res = $theme->clear_cache(null, $cacheid);
+ } else {
+ $res = $theme->clear_all_cache();
+ }
if ($res) {
LogUtil::registerStatus($this->__('Done! Deleted theme engine cached templates.'));
@@ -62,12 +62,13 @@
<p class="z-formnote z-informationmsg">{gt text="Notice: A cache lifetime of 0 will set the cache to continually regenerate; this is equivalent to no caching."}<br />{gt text="A cache lifetime of -1 will set the cache output to never expire."}</p>
</div>
<div class="z-formrow">
- <label for="theme_nocache">{gt text="Modules to exclude from caching"}</label>
+ <label for="theme_nocache">{gt text="Modules to exclude from theme caching"}</label>
<div id="theme_nocache">
{foreach from=$mods key=modname item=moddisplayname}
<div class="z-formlist">
<input id="theme_nocache_{$modname|safetext}" type="checkbox" name="modulesnocache[]" value="{$modname|safetext}"{if isset($modulesnocache.$modname)} checked="checked"{/if} />
<label for="theme_nocache_{$modname|safetext}">{$moddisplayname|safetext}</label>
+ <a class="z-indented" href="{modurl modname=Theme type=admin func=clear_cache cacheid=$modname csrftoken=$csrftoken}">{gt text="Delete cached pages"}</a>
</div>
{/foreach}
</div>

0 comments on commit 9d6365b

Please sign in to comment.