summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/orphans.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-08-14 00:51:52 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-08-14 00:51:52 -0400
commitf486271009142ec7e04e1a62c1e94ad9e51b6d39 (patch)
treef6957ee176bfda22099f306abce9570dfba5d24f /IkiWiki/Plugin/orphans.pm
parent949eb252e9f918bd57e58b75479ed3b4c017f87d (diff)
orphans: Reuse backlinks info
This plugin was building essentially the same data that is built to handle backlinks, so reuse that as an optimisation.
Diffstat (limited to 'IkiWiki/Plugin/orphans.pm')
-rw-r--r--IkiWiki/Plugin/orphans.pm8
1 files changed, 1 insertions, 7 deletions
diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm
index 02f5d2524..711226772 100644
--- a/IkiWiki/Plugin/orphans.pm
+++ b/IkiWiki/Plugin/orphans.pm
@@ -27,15 +27,9 @@ 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;
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