diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-01-03 01:33:57 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-01-03 01:33:57 +1100 |
| commit | 8fe1846e5642ad50790dc1626a025f9845d74d69 (patch) | |
| tree | ea35a105073c7175376bac749da2cc597db87581 | |
| parent | 5df6f85854f25581df787241773b8b39e23e8f00 (diff) | |
Allow mods to post in locked threads as per the config
| -rw-r--r-- | inc/config.php | 2 | ||||
| -rw-r--r-- | post.php | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/inc/config.php b/inc/config.php index 26607d25..ec697f79 100644 --- a/inc/config.php +++ b/inc/config.php @@ -189,6 +189,8 @@ define('MOD_STICKY', MOD_MOD, true); // Lock a thread define('MOD_LOCK', MOD_MOD, true); + // Post in a locked thread + define('MOD_POSTINLOCKED', MOD_MOD, true); /* Administration */ // Display the contents of instant-config.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) |
