diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-10-09 13:20:41 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-10-09 13:20:41 -0400 |
commit | 6f2cc5ac8cc7e76b3faf20cd7516f82bcb3de7ed (patch) | |
tree | 0ca5d3284887d58aa6303c6dca951c00755e91e3 /IkiWiki/Plugin/orphans.pm | |
parent | f9f7a6e9f34b120504bb1dc238a3a627e9a8e3dc (diff) | |
download | ikiwiki-6f2cc5ac8cc7e76b3faf20cd7516f82bcb3de7ed.tar ikiwiki-6f2cc5ac8cc7e76b3faf20cd7516f82bcb3de7ed.tar.gz |
pagespec_match_list: change limit to filter
Diffstat (limited to 'IkiWiki/Plugin/orphans.pm')
-rw-r--r-- | IkiWiki/Plugin/orphans.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm index b1ebd1b9d..702943f87 100644 --- a/IkiWiki/Plugin/orphans.pm +++ b/IkiWiki/Plugin/orphans.pm @@ -31,24 +31,24 @@ sub preprocess (@) { my @orphans=pagespec_match_list($params{page}, $params{pages}, # update when orphans are added/removed deptype => deptype("presence"), - limit => sub { + filter => sub { my $page=shift; # Filter out pages that other pages link to. - return 0 if IkiWiki::backlink_pages($page); + return 1 if IkiWiki::backlink_pages($page); # Toplevel index is assumed to never be orphaned. - return 0 if $page eq 'index'; + return 1 if $page eq 'index'; # If the page has a link to some other page, it's # indirectly linked via that page's backlinks. - return 0 if grep { + return 1 if grep { length $_ && ($_ !~ /\/\Q$config{discussionpage}\E$/i || ! $config{discussion}) && bestlink($page, $_) !~ /^(\Q$page\E|)$/ } @{$links{$page}}; - return 1; + return 0; }, ); |