X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/27376abb3c73e6d1e5d5743b8ddc1dc4790a60e7..d724a26754b3018ff6b119bb016c5ba261a51d0e:/IkiWiki/Plugin/recentchanges.pm diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index c8d222edb..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 $page) { - eval q{use Carp}; - Carp::cluck("undefined page; 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;