Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/ManagePosts.php
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
15 changes: 13 additions & 2 deletions Sources/ManageServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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], '<div');
$subtext = '';
if ($divPos !== false)
{
$subtext = preg_replace('~</?div[^>]*>~', '', 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] : '',
Expand All @@ -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');
}

/**
Expand Down Expand Up @@ -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');
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Subs-Editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Themes/core/MessageIndex.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ function template_main()
', $topic['is_sticky'] ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" class="floatright" alt="" id="stickyicon' . $topic['first_post']['id'] . '" style="margin: 0;" />' : '';

echo '
', $topic['is_sticky'] ? '<strong>' : '', '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], (!$context['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span>', $topic['is_sticky'] ? '</strong>' : '';
', $topic['is_sticky'] ? '<strong>' : '', '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], ($context['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span>', $topic['is_sticky'] ? '</strong>' : '';

// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
Expand Down
3 changes: 2 additions & 1 deletion Themes/default/Admin.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '
<dt>
Expand Down Expand Up @@ -1430,6 +1430,7 @@ function template_callback_question_answer_list()
<dt id="add_more_question_placeholder" style="display: none;"></dt><dd></dd>
<dt id="add_more_link_div" style="display: none;">
<a href="#" onclick="addAnotherQuestion(); return false;">&#171; ', $txt['setup_verification_add_more'], ' &#187;</a>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/admin.js?fin20"></script>

</dt><dd></dd>';

Expand Down
2 changes: 1 addition & 1 deletion Themes/default/MessageIndex.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function template_main()
</td>
<td class="subject ', $alternate_class, '">
<div ', (!empty($topic['quick_mod']['modify']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\');"' : ''), '>
', $topic['is_sticky'] ? '<strong>' : '', '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], (!$context['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span>', $topic['is_sticky'] ? '</strong>' : '';
', $topic['is_sticky'] ? '<strong>' : '', '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], ($context['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span>', $topic['is_sticky'] ? '</strong>' : '';

// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
Expand Down
4 changes: 2 additions & 2 deletions Themes/default/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down