X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/319e2c94deeffc3ffe1244d8afe27c6007b9b47b..762bf0b887743db0267a50852c2eb3eaa8fb8042:/IkiWiki/Plugin/recentchanges.pm diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index 3020b6a6a..8383fb72a 100644 --- a/IkiWiki/Plugin/recentchanges.pm +++ b/IkiWiki/Plugin/recentchanges.pm @@ -40,14 +40,8 @@ sub pagetemplate (@) { #{{{ my $template=$params{template}; my $page=$params{page}; - # XXX this is here because I've been seeing a strange uninitialized - # value in this sub. - if (! defined $config{recentchangespage}) { - eval q{use Carp}; - Carp::cluck("undefined recentchangespage; please report this to Joey"); - } - - if ($config{rcs} && $page ne $config{recentchangespage} && + if (defined $config{recentchangespage} && $config{rcs} && + $page ne $config{recentchangespage} && $template->query(name => "recentchangesurl")) { $template->param(recentchangesurl => urlto($config{recentchangespage}, $page)); $template->param(have_actions => 1); @@ -86,7 +80,7 @@ sub cgi ($) { #{{{ "

"); } else { - IkiWiki::redirect($cgi, $config{url}."/".htmlpage($link)); + IkiWiki::redirect($cgi, $config{url}.IkiWiki::beautify_urlpath("/".htmlpage($link))); } exit;