Add TINYIB_NOFILEOK for file-less new threads

json
Trevor Slocum 2014-10-27 17:06:52 -07:00
parent 7a23dd2e88
commit 884802259b
3 changed files with 5 additions and 1 deletions

View File

@ -228,7 +228,7 @@ if (isset($_POST['message']) || isset($_POST['file'])) {
}
if ($post['file'] == '') { // No file uploaded
if ($post['parent'] == TINYIB_NEWTHREAD && (TINYIB_PIC || TINYIB_SWF || TINYIB_WEBM)) {
if ($post['parent'] == TINYIB_NEWTHREAD && (TINYIB_PIC || TINYIB_SWF || TINYIB_WEBM) && !TINYIB_NOFILEOK) {
fancyDie("A file is required to start a thread.");
}
if (str_replace('<br>', '', $post['message']) == "") {

View File

@ -27,6 +27,9 @@ if (!defined('TINYIB_SWF')) {
if (!defined('TINYIB_WEBM')) {
define('TINYIB_WEBM', false);
}
if (!defined('TINYIB_NOFILEOK')) {
define('TINYIB_NOFILEOK', false);
}
if (!defined('TINYIB_REQMOD')) {
define('TINYIB_REQMOD', 'disable');
}

View File

@ -35,6 +35,7 @@ define('TINYIB_WEBM', false); // Enable .weba and .webm audio/video file
// File control
define('TINYIB_MAXKB', 2048); // Maximum file size in kilobytes [0 to disable]
define('TINYIB_MAXKBDESC', "2 MB"); // Human-readable representation of the maximum file size
define('TINYIB_NOFILEOK', false); // Allow the creation of new threads without uploading a file
// Thumbnail size - new thread
define('TINYIB_MAXWOP', 250); // Width