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}) {
}
}
+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();