From 8fe1846e5642ad50790dc1626a025f9845d74d69 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Mon, 3 Jan 2011 01:33:57 +1100 Subject: Allow mods to post in locked threads as per the config --- post.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'post.php') diff --git a/post.php b/post.php index 452aa054..f76b2c73 100644 --- a/post.php +++ b/post.php @@ -69,10 +69,7 @@ //Check if thread exists if(!$OP && !threadExists($post['thread'])) error(ERROR_NONEXISTANT); - - if(!$OP && threadLocked($post['thread'])) - error(ERROR_LOCKED); - + // Check for a file if($OP) { if(!isset($_FILES['file']['tmp_name']) || empty($_FILES['file']['tmp_name'])) @@ -102,6 +99,14 @@ if($post['locked'] && $mod['type'] < MOD_LOCK) error(ERROR_NOACCESS); } + // Check if thread is locked + // but allow mods to post + if(!$OP && threadLocked($post['thread'])) { + if(!$mod || $mod['type'] < MOD_POSTINLOCKED) { + error(ERROR_LOCKED); + } + } + if($post['has_file']) { $size = $_FILES['file']['size']; if($size > MAX_FILESIZE) -- cgit v1.3