From: Simon McVittie Date: Wed, 2 Jan 2013 18:05:33 +0000 (+0000) Subject: opendiscussion: don't allow editing discussionpage if discussion is disabled X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6e962a2d747bd8a8bbbdfc5b8eaeb689100c0b1c;p=ikiwiki.git opendiscussion: don't allow editing discussionpage if discussion is disabled --- diff --git a/IkiWiki/Plugin/opendiscussion.pm b/IkiWiki/Plugin/opendiscussion.pm index 2805f60ef..808d3cd2b 100644 --- a/IkiWiki/Plugin/opendiscussion.pm +++ b/IkiWiki/Plugin/opendiscussion.pm @@ -25,7 +25,7 @@ sub canedit ($$) { my $cgi=shift; my $session=shift; - return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/i; + return "" if $config{discussion} && $page=~/(\/|^)\Q$config{discussionpage}\E$/i; return "" if pagespec_match($page, "postcomment(*)"); return undef; } diff --git a/doc/bugs/opendiscussion_should_respect_the_discussion_option.mdwn b/doc/bugs/opendiscussion_should_respect_the_discussion_option.mdwn index e4bc736e3..0b9ed08be 100644 --- a/doc/bugs/opendiscussion_should_respect_the_discussion_option.mdwn +++ b/doc/bugs/opendiscussion_should_respect_the_discussion_option.mdwn @@ -4,3 +4,5 @@ the `discussionpage` setting to be edited anonymously, even if (If it respected the `discussion` option, the combination of `opendiscussion` and `moderatedcomments` might be good for blogs.) + +[[done]] --[[smcv]]