]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Render.pm
search: Avoid '$' in the wikiname appearing unescaped on omega's query template,...
[git.ikiwiki.info.git] / IkiWiki / Render.pm
index c82d8a35a913b9c233f2fbb49d57ffb37602106e..af24df1550ee7682d649a79e046d0e604c39e0cf 100644 (file)
@@ -78,11 +78,14 @@ sub genpage ($$) {
        my $actions=0;
 
        if (length $config{cgiurl}) {
        my $actions=0;
 
        if (length $config{cgiurl}) {
-               $template->param(editurl => cgiurl(do => "edit", page => $page))
-                       if IkiWiki->can("cgi_editpage");
-               $template->param(prefsurl => cgiurl(do => "prefs"))
-                       if exists $hooks{auth};
-               $actions++;
+               if (IkiWiki->can("cgi_editpage")) {
+                       $template->param(editurl => cgiurl(do => "edit", page => $page));
+                       $actions++;
+               }
+               if (exists $hooks{auth}) {
+                       $template->param(prefsurl => cgiurl(do => "prefs"));
+                       $actions++;
+               }
        }
                
        if (defined $config{historyurl} && length $config{historyurl}) {
        }
                
        if (defined $config{historyurl} && length $config{historyurl}) {
@@ -680,6 +683,17 @@ sub refresh () {
        }
 }
 
        }
 }
 
+sub clean_rendered {
+       lockwiki();
+       loadindex();
+       remove_unrendered();
+       foreach my $page (keys %oldrenderedfiles) {
+               foreach my $file (@{$oldrenderedfiles{$page}}) {
+                       prune($config{destdir}."/".$file);
+               }
+       }
+}
+
 sub commandline_render () {
        lockwiki();
        loadindex();
 sub commandline_render () {
        lockwiki();
        loadindex();