Optimize code when checking if locked.
This commit is contained in:
parent
8fe1846e56
commit
01bbe8fca7
5
post.php
5
post.php
@ -101,10 +101,9 @@
|
|||||||
|
|
||||||
// Check if thread is locked
|
// Check if thread is locked
|
||||||
// but allow mods to post
|
// but allow mods to post
|
||||||
if(!$OP && threadLocked($post['thread'])) {
|
if(!$OP && (!$mod || $mod['type'] < MOD_POSTINLOCKED)) {
|
||||||
if(!$mod || $mod['type'] < MOD_POSTINLOCKED) {
|
if(threadLocked($post['thread']))
|
||||||
error(ERROR_LOCKED);
|
error(ERROR_LOCKED);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($post['has_file']) {
|
if($post['has_file']) {
|
||||||
|
Loading…
Reference in New Issue
Block a user