]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/recentchanges.pm
Render.pm: also use 'our' for $backlinks_calculated
[git.ikiwiki.info.git] / IkiWiki / Plugin / recentchanges.pm
index 12577e9efc9f56e1748a160a6cdab5b768540501..7071596e6603586d6d2682aef0c4d37f56b25788 100644 (file)
@@ -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";