]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
opendiscussion: don't allow editing discussionpage if discussion is disabled
authorSimon McVittie <smcv@debian.org>
Wed, 2 Jan 2013 18:05:33 +0000 (18:05 +0000)
committerSimon McVittie <smcv@debian.org>
Wed, 2 Jan 2013 18:05:33 +0000 (18:05 +0000)
IkiWiki/Plugin/opendiscussion.pm
doc/bugs/opendiscussion_should_respect_the_discussion_option.mdwn

index 2805f60efdb6d415a19aeb17195df8ff2543487b..808d3cd2bd730c3847a876e016df9145c4bb32a9 100644 (file)
@@ -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;
 }
index e4bc736e3c3b73a71a6a0288f4049cf92b36d8cb..0b9ed08beda515d2cd14271cf2dbe038c9c6c443 100644 (file)
@@ -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]]