forked from github/kensanata.oddmuse
Disallow minor comments when $EditAllowed is 3
Otherwise people can sneak some comments in
This commit is contained in:
3
wiki.pl
3
wiki.pl
@@ -3183,7 +3183,8 @@ sub UserCanEdit {
|
||||
return 0 if not $EditAllowed or -f $NoEditFile;
|
||||
return 0 if $editing and UserIsBanned(); # this call is more expensive
|
||||
return 0 if $EditAllowed >= 2 and (not $CommentsPattern or $id !~ /$CommentsPattern/o);
|
||||
return 1 if $EditAllowed >= 3 and ($comment or (GetParam('aftertext', '') and not GetParam('text', '')));
|
||||
return 1 if $EditAllowed >= 3 and not GetParam('recent_edit', '') # disallow minor comments
|
||||
and ($comment or (GetParam('aftertext', '') and not GetParam('text', '')));
|
||||
return 0 if $EditAllowed >= 3;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user