diff -urN punbb-1.4.1/admin/bans.php punbb-1.4.2/admin/bans.php --- punbb-1.4.1/admin/bans.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/admin/bans.php 2012-02-09 20:42:20.000000000 +0000 @@ -4,7 +4,7 @@ * * Allows administrators and moderators to create, modify, and delete bans. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -223,7 +223,7 @@
@@ -478,7 +478,7 @@ @@ -544,7 +544,7 @@'.sprintf($lang_common['Querytime'], $time_diff, forum_number_format($forum_db->get_num_queries())).'
'."\n"; + $time_diff = forum_microtime() - $forum_start; + $query_time_total = $time_percent_db = 0.0; + + $saved_queries = $forum_db->get_saved_queries(); + if (count($saved_queries) > 0) + { + foreach ($saved_queries as $cur_query) + { + $query_time_total += $cur_query[1]; + } + + if ($query_time_total > 0 && $time_diff > 0) + { + $time_percent_db = ($query_time_total / $time_diff) * 100; + } + } + + echo ''.sprintf($lang_common['Querytime'], + forum_number_format($time_diff, 3), + forum_number_format(100 - $time_percent_db, 0), + forum_number_format($time_percent_db, 0), + forum_number_format($forum_db->get_num_queries())).'
'."\n"; } if (defined('FORUM_SHOW_QUERIES')) diff -urN punbb-1.4.1/header.php punbb-1.4.2/header.php --- punbb-1.4.1/header.php 2011-10-31 18:51:50.000000000 +0000 +++ punbb-1.4.2/header.php 2012-02-09 20:42:20.000000000 +0000 @@ -2,7 +2,7 @@ /** * Outputs the header used by most forum pages. * - * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org + * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher * @package PunBB */ @@ -54,7 +54,7 @@ while (preg_match('##', $tpl_main, $cur_include)) { if (!file_exists(FORUM_ROOT.'include/user/'.$cur_include[1])) - error('Unable to process user include <!-- forum_include "'.forum_htmlencode($cur_include[1]).'" --> from template main.tpl.'.$lang_common['Database mismatch'].' '.$lang_common['Database mismatch alert'].'
'; if (!empty($alert_items)) - $admod_links['alert'] = ''.$lang_common['New alerts'].''; + $admod_links['alert'] = ''.implode(' ', $admod_links).'
' : '', $tpl_main); +$tpl_main = str_replace('', (!empty($admod_links)) ? ''.generate_crumbs(false).'
'."\n".''.forum_htmlencode($lang_common['Forum error description']).'
'."\n"; if ($num_args > 1) { if (defined('FORUM_DEBUG')) { - if (isset($file) && isset($line)) - echo 'The error occurred on line '.$line.' in '.$file.'
'."\n"; - $db_error = isset($GLOBALS['forum_db']) ? $GLOBALS['forum_db']->error() : array(); if (!empty($db_error['error_msg'])) { - echo 'Database reported: '.forum_htmlencode($db_error['error_msg']).(($db_error['error_no']) ? ' (Errno: '.$db_error['error_no'].')' : '').'.
'."\n"; + echo ''.forum_htmlencode($lang_common['Forum error db reported']).' '.forum_htmlencode($db_error['error_msg']).(($db_error['error_no']) ? ' (Errno: '.$db_error['error_no'].')' : '').'.
'."\n"; if ($db_error['error_sql'] != '') - echo 'Failed query: '.forum_htmlencode($db_error['error_sql']).'
'.forum_htmlencode($lang_common['Forum error db query']).' '.forum_htmlencode($db_error['error_sql']).'
'.forum_htmlencode(sprintf($lang_common['Forum error location'], $line, $file)).'
'."\n"; } - else - echo 'Note: For detailed error information (necessary for troubleshooting), enable "DEBUG mode".
To enable "DEBUG mode", open up the file config.php in a text editor, add a line that looks like
Once you\'ve solved the problem, it is recommended that "DEBUG mode" be turned off again (just remove the line from the file and re-upload it).