recentchanges_link CGI: If the linked page is internal, use its permalink
This fixes a bug, that comments appear in recentchanges as broken links.master
parent
7f1992cbe1
commit
05bb65fc68
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue