|
@@ -202,7 +202,8 @@ function logLastDatabaseError()
|
|
function displayDebug()
|
|
function displayDebug()
|
|
{
|
|
{
|
|
global $context, $scripturl, $boarddir, $modSettings, $boarddir;
|
|
global $context, $scripturl, $boarddir, $modSettings, $boarddir;
|
|
- global $db_cache, $db_count, $db_show_debug, $cache_count, $cache_hits, $txt;
|
|
|
|
|
|
+ global $db_cache, $db_count, $db_show_debug, $cache_count, $cache_hits;
|
|
|
|
+ global $smcFunc, $txt;
|
|
|
|
|
|
// Add to Settings.php if you want to show the debugging information.
|
|
// Add to Settings.php if you want to show the debugging information.
|
|
if (!isset($db_show_debug) || $db_show_debug !== true || (isset($_GET['action']) && $_GET['action'] == 'viewquery') || WIRELESS)
|
|
if (!isset($db_show_debug) || $db_show_debug !== true || (isset($_GET['action']) && $_GET['action'] == 'viewquery') || WIRELESS)
|
|
@@ -303,7 +304,7 @@ function displayDebug()
|
|
$qq['f'] = preg_replace('~^' . preg_quote($boarddir, '~') . '~', '...', $qq['f']);
|
|
$qq['f'] = preg_replace('~^' . preg_quote($boarddir, '~') . '~', '...', $qq['f']);
|
|
|
|
|
|
echo '
|
|
echo '
|
|
- <strong>', $is_select ? '<a href="' . $scripturl . '?action=viewquery;qq=' . ($q + 1) . '#qq' . $q . '" target="_blank" class="new_win" style="text-decoration: none;">' : '', nl2br(str_replace("\t", ' ', htmlspecialchars(ltrim($qq['q'], "\n\r")))) . ($is_select ? '</a></strong>' : '</strong>') . '<br />
|
|
|
|
|
|
+ <strong>', $is_select ? '<a href="' . $scripturl . '?action=viewquery;qq=' . ($q + 1) . '#qq' . $q . '" target="_blank" class="new_win" style="text-decoration: none;">' : '', nl2br(str_replace("\t", ' ', $smcFunc['htmlspecialchars'](ltrim($qq['q'], "\n\r")))) . ($is_select ? '</a></strong>' : '</strong>') . '<br />
|
|
';
|
|
';
|
|
if (!empty($qq['f']) && !empty($qq['l']))
|
|
if (!empty($qq['f']) && !empty($qq['l']))
|
|
echo sprintf($txt['debug_query_in_line'], $qq['f'], $qq['l']);
|
|
echo sprintf($txt['debug_query_in_line'], $qq['f'], $qq['l']);
|