diff --git a/Sources/ManagePosts.php b/Sources/ManagePosts.php index 9e5058a6209..df345f5a938 100644 --- a/Sources/ManagePosts.php +++ b/Sources/ManagePosts.php @@ -230,7 +230,7 @@ function ModifyPostSettings($return_config = false) if ($column == 'body' && $index['type'] == 'fulltext') $fulltext = true; - if (isset($body_type) && $_POST['max_messageLength'] > 65535 && $body_type == 'text') + if (isset($body_type) && ($_POST['max_messageLength'] > 65535 || $_POST['max_messageLength'] == 0) && $body_type == 'text') { // @todo Show an error message?! // MySQL only likes fulltext indexes on text columns... for now? diff --git a/Sources/ManageServer.php b/Sources/ManageServer.php index a68daf14b06..8f5d7e5b6fe 100644 --- a/Sources/ManageServer.php +++ b/Sources/ManageServer.php @@ -484,6 +484,16 @@ function prepareServerSettingsContext(&$config_vars) $varname = $config_var[0]; global $$varname; + // Set the subtext in case it's part of the label. + // @todo Temporary. Preventing divs inside label tags. + $divPos = strpos($config_var[1], ']*>~', '', substr($config_var[1], $divPos)); + $config_var[1] = substr($config_var[1], 0, $divPos); + } + $context['config_vars'][] = array( 'label' => $config_var[1], 'help' => isset($config_var[5]) ? $config_var[5] : '', @@ -494,15 +504,16 @@ function prepareServerSettingsContext(&$config_vars) 'value' => $config_var[2] == 'file' ? htmlspecialchars($$varname) : (isset($modSettings[$config_var[0]]) ? htmlspecialchars($modSettings[$config_var[0]]) : (in_array($config_var[3], array('int', 'float')) ? 0 : '')), 'disabled' => !empty($context['settings_not_writable']) || !empty($config_var['disabled']), 'invalid' => false, + 'subtext' => $subtext, 'javascript' => '', 'preinput' => '', 'postinput' => '', ); + } } createToken('admin-ssc'); - createToken('admin-dbsc'); } /** @@ -659,7 +670,7 @@ function prepareDBSettingContext(&$config_vars) } } - call_integration_hook('integrate_prepare_server_settings', array(&$config_vars)); + call_integration_hook('integrate_prepare_db_settings', array(&$config_vars)); createToken('admin-dbsc'); } diff --git a/Sources/Subs-Editor.php b/Sources/Subs-Editor.php index 193db05c095..c3f8998242b 100644 --- a/Sources/Subs-Editor.php +++ b/Sources/Subs-Editor.php @@ -2011,7 +2011,7 @@ function create_control_verification(&$verificationOptions, $do_test = false) $incorrectQuestions = array(); while ($row = $smcFunc['db_fetch_assoc']($request)) { - if (empty($_REQUEST[$verificationOptions['id'] . '_vv']['q'][$row['id_comment']]) || trim($smcFunc['htmlspecialchars'](strtolower($_REQUEST[$verificationOptions['id'] . '_vv']['q'][$row['id_comment']]))) != strtolower($row['answer'])) + if (!isset($_REQUEST[$verificationOptions['id'] . '_vv']['q'][$row['id_comment']]) || trim($_REQUEST[$verificationOptions['id'] . '_vv']['q'][$row['id_comment']]) == '' || trim($smcFunc['htmlspecialchars'](strtolower($_REQUEST[$verificationOptions['id'] . '_vv']['q'][$row['id_comment']]))) != strtolower($row['answer'])) $incorrectQuestions[] = $row['id_comment']; } $smcFunc['db_free_result']($request); diff --git a/Themes/core/MessageIndex.template.php b/Themes/core/MessageIndex.template.php index a8d7dbe60be..f204a9ad87b 100644 --- a/Themes/core/MessageIndex.template.php +++ b/Themes/core/MessageIndex.template.php @@ -258,7 +258,7 @@ function template_main() ', $topic['is_sticky'] ? '' : ''; echo ' - ', $topic['is_sticky'] ? '' : '', '', $topic['first_post']['link'], (!$context['can_approve_posts'] && !$topic['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : ''), '', $topic['is_sticky'] ? '' : ''; + ', $topic['is_sticky'] ? '' : '', '', $topic['first_post']['link'], ($context['can_approve_posts'] && !$topic['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : ''), '', $topic['is_sticky'] ? '' : ''; // Is this topic new? (assuming they are logged in!) if ($topic['new'] && $context['user']['is_logged']) diff --git a/Themes/default/Admin.template.php b/Themes/default/Admin.template.php index f5736ffa114..e58e0fe881c 100644 --- a/Themes/default/Admin.template.php +++ b/Themes/default/Admin.template.php @@ -1396,7 +1396,7 @@ function toggleItem(itemID) // This little beauty shows questions and answer from the captcha type feature. function template_callback_question_answer_list() { - global $txt, $context; + global $txt, $context, $settings; echo '
@@ -1430,6 +1430,7 @@ function template_callback_question_answer_list()
'; diff --git a/Themes/default/MessageIndex.template.php b/Themes/default/MessageIndex.template.php index 0396acc91a7..8bd67fa0c71 100644 --- a/Themes/default/MessageIndex.template.php +++ b/Themes/default/MessageIndex.template.php @@ -255,7 +255,7 @@ function template_main()
- ', $topic['is_sticky'] ? '' : '', '', $topic['first_post']['link'], (!$context['can_approve_posts'] && !$topic['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : ''), '', $topic['is_sticky'] ? '' : ''; + ', $topic['is_sticky'] ? '' : '', '', $topic['first_post']['link'], ($context['can_approve_posts'] && !$topic['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : ''), '', $topic['is_sticky'] ? '' : ''; // Is this topic new? (assuming they are logged in!) if ($topic['new'] && $context['user']['is_logged']) diff --git a/Themes/default/css/index.css b/Themes/default/css/index.css index 48d550c6a70..f6c4014bef5 100644 --- a/Themes/default/css/index.css +++ b/Themes/default/css/index.css @@ -125,12 +125,12 @@ input:focus, textarea:focus, button:focus, select:focus } /* All input elements that are checkboxes or radio buttons shouldn't have a border around them. */ -.input_check, .input_radio +input.input_check, input.input_radio { border: none; background: none; } -h3.catbg .input_check +h3.catbg input.input_check { margin: 9px 7px 0 7px; }