diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2010-01-02 15:42:20 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2010-01-02 15:52:38 -0500 |
commit | 7dd074e2e712c67c8c1a26841a69281fa9d293cb (patch) | |
tree | 4282a47fa682450f19131c18941a051ea984960c /IkiWiki/Plugin | |
parent | ed67ff3b844f54392a4eb46cf7da297e7da61126 (diff) |
Fix several places that did not properly handle capitalization of the discussionpage setting.
Specifically, fixes discussion actions on discussion pages, and unbreaks the opendiscussion plugin.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/inline.pm | 4 | ||||
-rw-r--r-- | IkiWiki/Plugin/opendiscussion.pm | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 17d1611db..ec99300b3 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -357,9 +357,9 @@ sub preprocess_inline (@) { my $file = $pagesources{$page}; my $type = pagetype($file); if ($config{discussion}) { - if ($page !~ /.*\/\Q$config{discussionpage}\E$/ && + if ($page !~ /.*\/\Q$config{discussionpage}\E$/i && (length $config{cgiurl} || - exists $pagesources{$page."/".$config{discussionpage}})) { + exists $pagesources{$page."/".lc($config{discussionpage})})) { $template->param(have_actions => 1); $template->param(discussionlink => htmllink($page, diff --git a/IkiWiki/Plugin/opendiscussion.pm b/IkiWiki/Plugin/opendiscussion.pm index 1bec4b013..4517ff88b 100644 --- a/IkiWiki/Plugin/opendiscussion.pm +++ b/IkiWiki/Plugin/opendiscussion.pm @@ -23,7 +23,7 @@ sub canedit ($$) { my $cgi=shift; my $session=shift; - return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/; + return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/i; return undef; } |