|
From: Markus P. <mar...@us...> - 2005-04-16 01:55:13
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27656/includes Modified Files: mx_functions_phpbb.php page_tail.php Log Message: Renamed $starttime as $mx_starttime to avoid problems with other scripts overriding its value. Remember this variable is initialized in extension.inc and should live until page_tail.php is reached. Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mx_functions_phpbb.php 13 Apr 2005 21:23:25 -0000 1.5 --- mx_functions_phpbb.php 16 Apr 2005 01:55:03 -0000 1.6 *************** *** 278,282 **** global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $mx_root_path, $nav_links, $gen_simple_header, $images; global $userdata, $user_ip, $session_length, $page_title; - global $starttime; $sql_store = $sql; --- 278,281 ---- Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** page_tail.php 8 Mar 2005 19:09:42 -0000 1.11 --- page_tail.php 16 Apr 2005 01:55:04 -0000 1.12 *************** *** 32,37 **** $admin_link = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? '<a href="' . PORTAL_URL . 'admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : ''; ! $template->set_filenames( array( 'overall_footer' => ( empty( $gen_simple_header ) ) ? 'overall_footer.tpl' : 'simple_footer.tpl' ) ! ); if ( $show_edit_blocks_icon ) --- 32,38 ---- $admin_link = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? '<a href="' . PORTAL_URL . 'admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : ''; ! $template->set_filenames(array( ! 'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl' ) ! ); if ( $show_edit_blocks_icon ) *************** *** 53,66 **** if ( $edit_on ) { ! $template->assign_block_vars( 'switch_edit_on', array() ); } else { ! $template->assign_block_vars( 'switch_edit_off', array() ); } } // Compose additinal copy footer ! for ($i = 0; $i < count($mxbb_footer_addup); $i++) { if ( $i == 0 ) --- 54,67 ---- if ( $edit_on ) { ! $template->assign_block_vars('switch_edit_on', array()); } else { ! $template->assign_block_vars('switch_edit_off', array()); } } // Compose additinal copy footer ! for( $i = 0; $i < count($mxbb_footer_addup); $i++ ) { if ( $i == 0 ) *************** *** 82,112 **** $edit_nav_icon_url = PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/'; ! $template->assign_vars( array( ! // MX Addon ! 'U_PORTAL_ROOT_PATH' => PORTAL_URL, ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'MX_VERSION' => PORTAL_VERSION, ! 'MXBB_EXTRA' => $mxbb_footer_text, ! 'POWERED_BY' => $lang['Powered_by'], ! // END ! 'PHPBB_VERSION' => '2' . $board_config['version'], ! // 'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '', ! 'U_EDIT_NAV' => $edit_nav_icon_url, ! 'ADMIN_OPTIONS' => $lang['Show_admin_options'], ! 'ADMIN_LINK' => $admin_link ! ) ); // Generate stats ! $endtime = microtime(); ! $endtime = explode( " ", $endtime ); ! $endtime = $endtime[1] + $endtime[0]; ! $stime = $endtime - $starttime; ! $execution_stats = '<center><span class="copyright">' . sprintf( $lang['Execution_Stats'], $db->num_queries, round( $stime, 4 ) ) . '</span></center>'; // Comment out next 3 lines and stats will be turned off ! $template->assign_vars( array( 'EXECUTION_STATS' => $execution_stats ) ! ); ! $template->pparse( 'overall_footer' ); // Close our DB connection. --- 83,112 ---- $edit_nav_icon_url = PORTAL_URL . TEMPLATE_ROOT_PATH . 'images/'; ! $template->assign_vars(array( ! // MX Addon ! 'U_PORTAL_ROOT_PATH' => PORTAL_URL, ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'MX_VERSION' => PORTAL_VERSION, ! 'MXBB_EXTRA' => $mxbb_footer_text, ! 'POWERED_BY' => $lang['Powered_by'], ! // END ! 'PHPBB_VERSION' => '2' . $board_config['version'], ! // 'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '', ! 'U_EDIT_NAV' => $edit_nav_icon_url, ! 'ADMIN_OPTIONS' => $lang['Show_admin_options'], ! 'ADMIN_LINK' => $admin_link ! )); // Generate stats ! $endtime = explode(' ', microtime()); ! $stime = ( $endtime[1] + $endtime[0] ) - $mx_starttime; ! $execution_stats = '<center><span class="copyright">' . sprintf($lang['Execution_Stats'], $db->num_queries, round($stime, 4)) . '</span></center>'; // Comment out next 3 lines and stats will be turned off ! $template->assign_vars(array( ! 'EXECUTION_STATS' => $execution_stats) ! ); ! $template->pparse('overall_footer'); // Close our DB connection. *************** *** 139,141 **** --- 139,142 ---- //echo( '<br><br>'.var_export($_SESSION) ); exit; + ?> \ No newline at end of file |