opendiscussion: don't allow editing discussionpage if discussion is disabled

master
Simon McVittie 2013-01-02 18:05:33 +00:00
parent ad26978d5a
commit 6e962a2d74
2 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,7 @@ sub canedit ($$) {
my $cgi=shift; my $cgi=shift;
my $session=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 "" if pagespec_match($page, "postcomment(*)");
return undef; return undef;
} }

View File

@ -4,3 +4,5 @@ the `discussionpage` setting to be edited anonymously, even if
(If it respected the `discussion` option, the combination of (If it respected the `discussion` option, the combination of
`opendiscussion` and `moderatedcomments` might be good for blogs.) `opendiscussion` and `moderatedcomments` might be good for blogs.)
[[done]] --[[smcv]]