]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/orphans.pm
* POSIX::strftime doesn't know about encodings and doesn't return a utf8
[git.ikiwiki.info.git] / IkiWiki / Plugin / orphans.pm
index f8035db54b2de8d64426e7e54a14593f1c78eeb8..12b9d2e5236a1512dcb53f1a01b9d097b29d93c0 100644 (file)
@@ -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;
        }