X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/4558457402a4ab6bc795589a2e400fa66144f76e..5f33532468fbd52b15ab599a3198749efcfc7710:/IkiWiki/Plugin/recentchanges.pm

diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm
index fa851e466..e546e4702 100644
--- a/IkiWiki/Plugin/recentchanges.pm
+++ b/IkiWiki/Plugin/recentchanges.pm
@@ -60,15 +60,15 @@ sub refresh ($) {
 	}
 }
 
-# Enable the recentchanges link on wiki pages.
+# Enable the recentchanges link.
 sub pagetemplate (@) {
 	my %params=@_;
 	my $template=$params{template};
 	my $page=$params{page};
 
 	if (defined $config{recentchangespage} && $config{rcs} &&
-	    $page ne $config{recentchangespage} &&
-	    $template->query(name => "recentchangesurl")) {
+	    $template->query(name => "recentchangesurl") &&
+	    $page ne $config{recentchangespage}) {
 		$template->param(recentchangesurl => urlto($config{recentchangespage}, $page));
 		$template->param(have_actions => 1);
 	}
@@ -124,7 +124,7 @@ sub store ($$$) {
 	elsif (length $config{cgiurl}) {
 		$change->{authorurl} = IkiWiki::cgiurl(
 			do => "goto",
-			page => (length $config{userdir} ? "$config{userdir}/" : "").$change->{author},
+			page => IkiWiki::userpage($change->{author}),
 		);
 	}