summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Łabanowski <marcin@6irc.net>2015-02-26 21:18:11 +0100
committerMarcin Łabanowski <marcin@6irc.net>2015-02-26 21:18:11 +0100
commit56b29f799a7da0fc218fb7a15e593a9f1192a89c (patch)
treeca56e835a7fef87367317f973b201dd133011d38
parenta550c63f9c896ddba236d9136998a858c233b492 (diff)
parentaa0d606651a6dc0de4a9b430d89825245a65b15e (diff)
Merge pull request #121 from yeltsew7/master
Add in board locking
-rw-r--r--inc/config.php3
-rw-r--r--post.php4
2 files changed, 7 insertions, 0 deletions
diff --git a/inc/config.php b/inc/config.php
index 016b7f77..edbe7b2a 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -286,6 +286,9 @@
// Public and private key pair from https://www.google.com/recaptcha/admin/create
$config['recaptcha_public'] = '6LcXTcUSAAAAAKBxyFWIt2SO8jwx4W7wcSMRoN3f';
$config['recaptcha_private'] = '6LcXTcUSAAAAAOGVbVdhmEM1_SyRF4xTKe8jbzf_';
+
+ // Ability to lock a board for normal users and still allow mods to post. Could also be useful for making an archive board
+ $config['board_locked'] = false;
/*
* Custom filters detect certain posts and reject/ban accordingly. They are made up of a condition and an
diff --git a/post.php b/post.php
index 45fd021e..d1c963f5 100644
--- a/post.php
+++ b/post.php
@@ -16,6 +16,10 @@ if (get_magic_quotes_gpc()) {
$_POST = strip_array($_POST);
}
+if (!$_POST['mod'] && $config['board_locked']) {
+ error("Board is locked");
+}
+
if (isset($_POST['delete'])) {
// Delete