summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2015-02-26 21:44:52 +0100
committerczaks <marcin@6irc.net>2015-02-26 21:44:52 +0100
commita93f168c79a0c8137a6d9032d42e598469b4b072 (patch)
treee86739600846f438e31958457d7012150e72d069
parent0ab8890b67f58c8323fcbe6468dc9c580a4602ec (diff)
parent30d2f3adc3ac97d8f460e8e38dd70fa0a575c9c6 (diff)
Merge branch 'master' of github.com:vichan-devel/Tinyboard
-rw-r--r--LICENSE.md2
-rw-r--r--inc/config.php3
-rw-r--r--post.php4
3 files changed, 8 insertions, 1 deletions
diff --git a/LICENSE.md b/LICENSE.md
index 942ac82a..23b680b6 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,5 +1,5 @@
# License of vichan
-Copyright (c) 2012-2014 vichan-devel
+Copyright (c) 2012-2015 vichan-devel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
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