Commit 0ea4227d authored by Trevor Slocum's avatar Trevor Slocum

Rename TINYIB_HIDEFIELDSOP/TINYIB_HIDEFIELDS to /

Fixes #75
parent 5e0e39e7
......@@ -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])) {
......
......@@ -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) {
......
......@@ -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">';
......
......@@ -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]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment