X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/14b49376dc03672f896e5f1df3945a718a39d5a0..73682cefec9910c44ac01a73b45c87581d1f414e:/IkiWiki/Render.pm diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 8e4c8af71..2da18738d 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -7,8 +7,8 @@ use strict; use IkiWiki; use Encode; -our %backlinks=(); -our $backlinks_calculated=0; +my %backlinks; +my $backlinks_calculated=0; sub calculate_backlinks () { return if $backlinks_calculated; @@ -65,7 +65,8 @@ sub genpage ($$) { if (length $config{cgiurl}) { $template->param(editurl => cgiurl(do => "edit", page => $page)) if IkiWiki->can("cgi_editpage"); - $template->param(prefsurl => cgiurl(do => "prefs")); + $template->param(prefsurl => cgiurl(do => "prefs")) + if exists $hooks{auth}; $actions++; } @@ -76,7 +77,7 @@ sub genpage ($$) { $actions++; } if ($config{discussion}) { - my $discussionlink=gettext("discussion"); + my $discussionlink=lc(gettext("Discussion")); if ($page !~ /.*\/\Q$discussionlink\E$/ && (length $config{cgiurl} || exists $links{$page."/".$discussionlink})) { @@ -146,7 +147,7 @@ sub scan ($) { if ($config{discussion}) { # Discussion links are a special case since they're # not in the text of the page, but on its template. - $links{$page}=[ $page."/".gettext("discussion") ]; + $links{$page}=[ $page."/".lc(gettext("Discussion")) ]; } else { $links{$page}=[];