aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/brokenlinks.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/brokenlinks.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/brokenlinks.pm')
-rw-r--r--IkiWiki/Plugin/brokenlinks.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/brokenlinks.pm b/IkiWiki/Plugin/brokenlinks.pm
index f8d44892b..5ad4c917c 100644
--- a/IkiWiki/Plugin/brokenlinks.pm
+++ b/IkiWiki/Plugin/brokenlinks.pm
@@ -28,14 +28,13 @@ sub preprocess (@) {
add_depends($params{page}, $params{pages});
my %broken;
- my $discussion=gettext("Discussion");
foreach my $page (pagespec_match_list([keys %links],
$params{pages}, location => $params{page})) {
my %seen;
foreach my $link (@{$links{$page}}) {
next if $seen{$link};
$seen{$link}=1;
- next if $link =~ /.*\/\Q$discussion\E/i && $config{discussion};
+ next if $link =~ /.*\/\Q$config{discussionpage}\E/i && $config{discussion};
my $bestlink=bestlink($page, $link);
next if length $bestlink;
push @{$broken{$link}}, $page;