aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/inline.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-08-13 21:04:19 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-08-13 21:04:19 -0400
commit159c0c043cdd4009562087144a37fdda38eb6409 (patch)
tree8ee525ebf57336a25b9b9e9a0da10eb1efdcc049 /IkiWiki/Plugin/inline.pm
parent46c2d66fd37b12c2d02466118cb206000174f1b4 (diff)
downloadikiwiki-159c0c043cdd4009562087144a37fdda38eb6409.tar
ikiwiki-159c0c043cdd4009562087144a37fdda38eb6409.tar.gz
optimise gettext calls
Diffstat (limited to 'IkiWiki/Plugin/inline.pm')
-rw-r--r--IkiWiki/Plugin/inline.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 04ad6ed23..2fbb45e02 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -348,6 +348,9 @@ sub preprocess_inline (@) {
}
my $template=HTML::Template->new(@params) unless $raw;
+ my $discussionlink=lc(gettext("Discussion"))
+ if $config{discussion};
+
foreach my $page (@list) {
my $file = $pagesources{$page};
my $type = pagetype($file);
@@ -371,7 +374,6 @@ sub preprocess_inline (@) {
my $file = $pagesources{$page};
my $type = pagetype($file);
if ($config{discussion}) {
- my $discussionlink=lc(gettext("Discussion"));
if ($page !~ /.*\/\Q$discussionlink\E$/ &&
(length $config{cgiurl} ||
exists $links{$page."/".$discussionlink})) {