aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/orphans.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-08-13 21:41:33 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-08-13 21:41:33 -0400
commit830c9e59b2c4d5c90e4316d8e81558e1aeb132f2 (patch)
tree8eb2789a6039095f7704656ab43addce4b0bb7d4 /IkiWiki/Plugin/orphans.pm
parentfed73d8d922ec4d52457a99f652c1d0d26ba67c3 (diff)
downloadikiwiki-830c9e59b2c4d5c90e4316d8e81558e1aeb132f2.tar
ikiwiki-830c9e59b2c4d5c90e4316d8e81558e1aeb132f2.tar.gz
Add discussionpage configuration setting
By adding this setting, we get both more configurability, and a minor optimisation too, since gettext does not need to be called continually to get the Discussion value.
Diffstat (limited to 'IkiWiki/Plugin/orphans.pm')
-rw-r--r--IkiWiki/Plugin/orphans.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm
index 7c938ef74..02f5d2524 100644
--- a/IkiWiki/Plugin/orphans.pm
+++ b/IkiWiki/Plugin/orphans.pm
@@ -34,7 +34,6 @@ sub preprocess (@) {
}
my @orphans;
- my $discussion=lc(gettext("Discussion"));
foreach my $page (pagespec_match_list(
[ grep { ! $linkedto{$_} && $_ ne 'index' }
keys %pagesources ],
@@ -43,7 +42,7 @@ sub preprocess (@) {
# 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;