|
@@ -23,7 +23,7 @@ discard block |
|
|
block discarded – undo |
|
23
|
23
|
* |
|
24
|
24
|
* @return array The truncated array |
|
25
|
25
|
*/ |
|
26
|
|
-function truncateArray($arr, $max_length=1900) |
|
|
26
|
+function truncateArray($arr, $max_length = 1900) |
|
27
|
27
|
{ |
|
28
|
28
|
$curr_length = array_sum(array_map("strlen", $arr)); |
|
29
|
29
|
if ($curr_length <= $max_length) |
|
@@ -31,7 +31,7 @@ discard block |
|
|
block discarded – undo |
|
31
|
31
|
else |
|
32
|
32
|
{ |
|
33
|
33
|
// Truncate each element's value to a reasonable length |
|
34
|
|
- $param_max = floor($max_length/count($arr)); |
|
|
34
|
+ $param_max = floor($max_length / count($arr)); |
|
35
|
35
|
foreach ($arr as $key => &$value) |
|
36
|
36
|
$value = substr($value, 0, $param_max - strlen($key) - 5); |
|
37
|
37
|
return $arr; |
|
@@ -197,7 +197,7 @@ discard block |
|
|
block discarded – undo |
|
197
|
197
|
if (filemtime($boarddir . '/db_last_error.php') === $last_db_error_change) |
|
198
|
198
|
{ |
|
199
|
199
|
// Write the change |
|
200
|
|
- $write_db_change = '<' . '?' . "php\n" . '$db_last_error = ' . time() . ';' . "\n" . '?' . '>'; |
|
|
200
|
+ $write_db_change = '<' . '?' . "php\n" . '$db_last_error = ' . time() . ';' . "\n" . '?' . '>'; |
|
201
|
201
|
$written_bytes = file_put_contents($boarddir . '/db_last_error.php', $write_db_change, LOCK_EX); |
|
202
|
202
|
|
|
203
|
203
|
// survey says ... |
|
@@ -270,7 +270,7 @@ discard block |
|
|
block discarded – undo |
|
270
|
270
|
', $txt['debug_language_files'], count($context['debug']['language_files']), ': <em>', implode('</em>, <em>', $context['debug']['language_files']), '</em>.<br> |
|
271
|
271
|
', $txt['debug_stylesheets'], count($context['debug']['sheets']), ': <em>', implode('</em>, <em>', $context['debug']['sheets']), '</em>.<br> |
|
272
|
272
|
', $txt['debug_hooks'], empty($context['debug']['hooks']) ? 0 : count($context['debug']['hooks']) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_hooks\').style.display = \'inline\'; this.style.display = \'none\'; return false;">', $txt['debug_show'], '</a><span id="debug_hooks" style="display: none;"><em>' . implode('</em>, <em>', $context['debug']['hooks']), '</em></span>)', '<br> |
|
273
|
|
- ',(isset($context['debug']['instances']) ? ($txt['debug_instances'] . (empty($context['debug']['instances']) ? 0 : count($context['debug']['instances'])) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_instances\').style.display = \'inline\'; this.style.display = \'none\'; return false;">'. $txt['debug_show'] .'</a><span id="debug_instances" style="display: none;"><em>'. implode('</em>, <em>', array_keys($context['debug']['instances'])) .'</em></span>)'. '<br>') : ''),' |
|
|
273
|
+ ',(isset($context['debug']['instances']) ? ($txt['debug_instances'] . (empty($context['debug']['instances']) ? 0 : count($context['debug']['instances'])) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_instances\').style.display = \'inline\'; this.style.display = \'none\'; return false;">' . $txt['debug_show'] . '</a><span id="debug_instances" style="display: none;"><em>' . implode('</em>, <em>', array_keys($context['debug']['instances'])) . '</em></span>)' . '<br>') : ''), ' |
|
274
|
274
|
', $txt['debug_files_included'], count($files), ' - ', round($total_size / 1024), $txt['debug_kb'], ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_include_info\').style.display = \'inline\'; this.style.display = \'none\'; return false;">', $txt['debug_show'], '</a><span id="debug_include_info" style="display: none;"><em>', implode('</em>, <em>', $files), '</em></span>)<br>'; |
|
275
|
275
|
|
|
276
|
276
|
if (function_exists('memory_get_peak_usage')) |