diff options
author | Amitai Schlair <schmonz@magnetic-babysitter.(none)> | 2009-08-30 03:02:15 -0400 |
---|---|---|
committer | Amitai Schlair <schmonz@magnetic-babysitter.(none)> | 2009-08-30 03:02:15 -0400 |
commit | c36d2fa896e9ea42c0b6b0135ba04b4f4f60950f (patch) | |
tree | 22f1314d8e974c73bde4970c97d497628f2a1465 /IkiWiki/Plugin/orphans.pm | |
parent | 5e94e973eeb4ba75d9c37bd801278f686f0977c3 (diff) | |
parent | 517432273b96fc9e6bad9b7667ef6d1b04c699ee (diff) | |
download | ikiwiki-c36d2fa896e9ea42c0b6b0135ba04b4f4f60950f.tar ikiwiki-c36d2fa896e9ea42c0b6b0135ba04b4f4f60950f.tar.gz |
Merge branch 'master' of git://github.com/joeyh/ikiwiki
Diffstat (limited to 'IkiWiki/Plugin/orphans.pm')
-rw-r--r-- | IkiWiki/Plugin/orphans.pm | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm index 7c938ef74..711226772 100644 --- a/IkiWiki/Plugin/orphans.pm +++ b/IkiWiki/Plugin/orphans.pm @@ -27,23 +27,16 @@ sub preprocess (@) { # register a dependency. add_depends($params{page}, $params{pages}); - my %linkedto; - foreach my $p (keys %links) { - map { $linkedto{bestlink($p, $_)}=1 if length $_ } - @{$links{$p}}; - } - my @orphans; - my $discussion=lc(gettext("Discussion")); foreach my $page (pagespec_match_list( - [ grep { ! $linkedto{$_} && $_ ne 'index' } + [ grep { ! IkiWiki::backlink_pages($_) && $_ ne 'index' } keys %pagesources ], $params{pages}, location => $params{page})) { # 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 $_ && - ($_ !~ /\/\Q$discussion\E$/i || ! $config{discussion}) && + ($_ !~ /\/\Q$config{discussionpage}\E$/i || ! $config{discussion}) && bestlink($page, $_) !~ /^(\Q$page\E|)$/ } @{$links{$page}}; push @orphans, $page; |