From 830c9e59b2c4d5c90e4316d8e81558e1aeb132f2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Aug 2009 21:41:33 -0400 Subject: 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. --- IkiWiki/Plugin/editpage.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'IkiWiki/Plugin/editpage.pm') diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 467cd9ed5..fca970c60 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -229,8 +229,9 @@ sub cgi_editpage ($$) { my $dir=$from."/"; $dir=~s![^/]+/+$!!; - if ((defined $form->field('subpage') && length $form->field('subpage')) || - $page eq lc(gettext('Discussion'))) { + if ((defined $form->field('subpage') && + length $form->field('subpage')) || + $page eq lc($config{discussionpage})) { $best_loc="$from/$page"; } else { -- cgit v1.2.3