summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/recentchanges.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm
index 12577e9ef..7071596e6 100644
--- a/IkiWiki/Plugin/recentchanges.pm
+++ b/IkiWiki/Plugin/recentchanges.pm
@@ -95,6 +95,15 @@ sub cgi ($) {
IkiWiki::loadindex();
+ # If the page is internal (like a comment), see if it has a
+ # permalink. Comments do.
+ if (IkiWiki::isinternal($page) &&
+ defined $pagestate{$page}{meta}{permalink}) {
+ IkiWiki::redirect($cgi,
+ $pagestate{$page}{meta}{permalink});
+ exit;
+ }
+
my $link=bestlink("", $page);
if (! length $link) {
print "Content-type: text/html\n\n";