]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/recentchanges.pm
formatting etc
[git.ikiwiki.info.git] / IkiWiki / Plugin / recentchanges.pm
index 8135f9adb3d8071aedb30960952c803a3c95c310..8383fb72a12e19c8d92627956efc154855ff57e5 100644 (file)
@@ -39,7 +39,9 @@ sub pagetemplate (@) { #{{{
        my %params=@_;
        my $template=$params{template};
        my $page=$params{page};
        my %params=@_;
        my $template=$params{template};
        my $page=$params{page};
-       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);
            $template->query(name => "recentchangesurl")) {
                $template->param(recentchangesurl => urlto($config{recentchangespage}, $page));
                $template->param(have_actions => 1);
@@ -78,7 +80,7 @@ sub cgi ($) { #{{{
                                "</p>");
                }
                else {
                                "</p>");
                }
                else {
-                       IkiWiki::redirect($cgi, $config{url}."/".htmlpage($link));
+                       IkiWiki::redirect($cgi, $config{url}.IkiWiki::beautify_urlpath("/".htmlpage($link)));
                }
 
                exit;
                }
 
                exit;