use IkiWiki;
use Encode;
-our %backlinks=();
-our $backlinks_calculated=0;
+my %backlinks;
+my $backlinks_calculated=0;
sub calculate_backlinks () {
return if $backlinks_calculated;
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++;
}
$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})) {
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}=[];