From 4c89a2693484d014c296131c58f662b62800b636 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Jan 2010 12:51:45 -0500 Subject: [PATCH] fix actions accounting --- IkiWiki/Render.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index c82d8a35a..3ebb1a324 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -78,11 +78,14 @@ sub genpage ($$) { 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}) {