Rename TINYIB_HIDEFIELDSOP/TINYIB_HIDEFIELDS to /

Fixes #75
This commit is contained in:
Trevor Slocum 2018-09-12 14:47:13 -07:00
parent 5e0e39e7eb
commit 0ea4227d50
4 changed files with 12 additions and 12 deletions

View File

@ -87,7 +87,7 @@ if (!isset($_GET['delete']) && !isset($_GET['manage']) && (isset($_POST['name'])
}
$post = newPost(setParent());
$hide_fields = $post['parent'] == TINYIB_NEWTHREAD ? TINYIB_HIDEFIELDSOP : TINYIB_HIDEFIELDS;
$hide_fields = $post['parent'] == TINYIB_NEWTHREAD ? $tinyib_hidefieldsop : $tinyib_hidefields;
$post['ip'] = $_SERVER['REMOTE_ADDR'];
if ($rawpost || !in_array('name', $hide_fields)) {
@ -193,7 +193,7 @@ if (!isset($_GET['delete']) && !isset($_GET['manage']) && (isset($_POST['name'])
}
$file_info = getimagesize($_FILES['file']['tmp_name']);
$file_mime = mime_content_type($file_location);
$file_mime = mime_content_type($_FILES['file']['tmp_name']);
}
if (empty($file_mime) || !isset($tinyib_uploads[$file_mime])) {

View File

@ -13,12 +13,6 @@ define('TINYIB_WORDBREAK_IDENTIFIER', '@!@TINYIB_WORDBREAK@!@');
if (!defined('TINYIB_INDEX')) {
define('TINYIB_INDEX', 'index.html');
}
if (!defined('TINYIB_HIDEFIELDSOP')) {
define('TINYIB_HIDEFIELDSOP', array());
}
if (!defined('TINYIB_HIDEFIELDS')) {
define('TINYIB_HIDEFIELDS', array());
}
if (!defined('TINYIB_MAXREPLIES')) {
define('TINYIB_MAXREPLIES', 0);
}
@ -61,6 +55,12 @@ if (!defined('TINYIB_DBDRIVER')) {
if (!defined('TINYIB_DBDSN')) {
define('TINYIB_DBDSN', '');
}
if (!isset($tinyib_hidefieldsop)) {
$tinyib_hidefieldsop = array();
}
if (!isset($tinyib_hidefields)) {
$tinyib_hidefields = array();
}
if (!isset($tinyib_uploads)) {
$tinyib_uploads = array();
if (defined('TINYIB_PIC') && TINYIB_PIC) {

View File

@ -71,8 +71,8 @@ function makeLinksClickable($text) {
}
function buildPostForm($parent, $raw_post = false) {
global $tinyib_uploads, $tinyib_embeds;
$hide_fields = $parent == TINYIB_NEWTHREAD ? TINYIB_HIDEFIELDSOP : TINYIB_HIDEFIELDS;
global $tinyib_hidefieldsop, $tinyib_hidefields, $tinyib_uploads, $tinyib_embeds;
$hide_fields = $parent == TINYIB_NEWTHREAD ? $tinyib_hidefieldsop : $tinyib_hidefields;
$postform_extra = array('name' => '', 'email' => '', 'subject' => '', 'footer' => '');
$input_submit = '<input type="submit" value="Submit" accesskey="z">';

View File

@ -22,13 +22,13 @@ define('TINYIB_REQMOD', ''); // Require moderation before displaying po
// Board appearance
define('TINYIB_INDEX', 'index.html'); // Index file
define('TINYIB_LOGO', ''); // Logo HTML
define('TINYIB_HIDEFIELDSOP',array());// Fields to hide when creating a new thread - e.g. array('name', 'email', 'subject', 'message', 'file', 'embed', 'password')
define('TINYIB_HIDEFIELDS', array()); // Fields to hide when replying
define('TINYIB_THREADSPERPAGE', 10); // Amount of threads shown per index page
define('TINYIB_PREVIEWREPLIES', 3); // Amount of replies previewed on index pages
define('TINYIB_TRUNCATE', 15); // Messages are truncated to this many lines on board index pages [0 to disable]
define('TINYIB_WORDBREAK', 80); // Words longer than this many characters will be broken apart [0 to disable]
define('TINYIB_TIMEZONE', 'UTC'); // See https://secure.php.net/manual/en/timezones.php - e.g. America/Los_Angeles
$tinyib_hidefieldsop = array(); // Fields to hide when creating a new thread - e.g. array('name', 'email', 'subject', 'message', 'file', 'embed', 'password')
$tinyib_hidefields = array(); // Fields to hide when replying
// Post control
define('TINYIB_DELAY', 30); // Delay (in seconds) between posts from the same IP address to help control flooding [0 to disable]