aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2013-01-02 18:05:33 +0000
committerSimon McVittie <smcv@debian.org>2013-01-02 18:05:33 +0000
commit6e962a2d747bd8a8bbbdfc5b8eaeb689100c0b1c (patch)
tree2287d404a62e628ed8e61221a0b7d8a521e23e8a
parentad26978d5acec2103c5da5c89dcb86f044ce499e (diff)
downloadikiwiki-6e962a2d747bd8a8bbbdfc5b8eaeb689100c0b1c.tar
ikiwiki-6e962a2d747bd8a8bbbdfc5b8eaeb689100c0b1c.tar.gz
opendiscussion: don't allow editing discussionpage if discussion is disabled
-rw-r--r--IkiWiki/Plugin/opendiscussion.pm2
-rw-r--r--doc/bugs/opendiscussion_should_respect_the_discussion_option.mdwn2
2 files changed, 3 insertions, 1 deletions
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]]