From: joey Date: Sun, 25 Jun 2006 07:21:53 +0000 (+0000) Subject: * Fix orphans plugin to not count a link to a nonexistant page as a reason X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/5fa878cc75447f7a93565843c5a172fed0c3e73d * Fix orphans plugin to not count a link to a nonexistant page as a reason for a page not being an orphan. --- diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm index f8035db54..12b9d2e52 100644 --- a/IkiWiki/Plugin/orphans.pm +++ b/IkiWiki/Plugin/orphans.pm @@ -31,7 +31,11 @@ sub preprocess (@) { #{{{ next unless IkiWiki::globlist_match($page, $params{pages}); # If the page has a link to some other page, it's # indirectly linked to a page via that page's backlinks. - next if grep { length $_ && ($_ !~/\/Discussion$/i || ! $IkiWiki::config{discussion}) && IkiWiki::bestlink($page, $_) ne $page } @{$IkiWiki::links{$page}}; + next if grep { + length $_ && + ($_ !~ /\/Discussion$/i || ! $IkiWiki::config{discussion}) && + IkiWiki::bestlink($page, $_) !~ /^($page|)$/ + } @{$IkiWiki::links{$page}}; push @orphans, $page; } diff --git a/debian/changelog b/debian/changelog index 6f42b8dd1..c1bd99da5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (1.8) UNRELEASED; urgency=low + + * Fix orphans plugin to not count a link to a nonexistant page as a reason + for a page not being an orphan. + + -- Joey Hess Sun, 25 Jun 2006 03:20:48 -0400 + ikiwiki (1.7) unstable; urgency=low * Updated logo from Recai with some kerning and alingment tuning.