X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/1ca191b5707ef38af5cbe196e314d57cd5c8c065..aa306957bac11477b914ac19b93890184ffe4062:/IkiWiki/Plugin/orphans.pm diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm index 605e6e43a..cf74c9b79 100644 --- a/IkiWiki/Plugin/orphans.pm +++ b/IkiWiki/Plugin/orphans.pm @@ -35,9 +35,10 @@ sub preprocess (@) { my @orphans; my $discussion=gettext("discussion"); - foreach my $page (keys %pagesources) { - next if $linkedto{$page} || $page eq 'index'; - next unless pagespec_match($page, $params{pages}, location => $params{page}); + foreach my $page (pagespec_match_list( + [ grep { ! $linkedto{$_} && $_ 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 {