|
From: OryNider <ory...@us...> - 2008-01-18 10:28:41
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16080/includes Modified Files: mx_functions_core.php mx_functions_phpbb.php Log Message: mx_message_die() upgrade plus an @ in funtions_install Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** mx_functions_core.php 15 Jan 2008 10:53:13 -0000 1.59 --- mx_functions_core.php 18 Jan 2008 10:28:37 -0000 1.60 *************** *** 65,69 **** global $db; ! if (($config = $this->get('phpbb_config')) && $use_cache ) { return $config; --- 65,69 ---- global $db; ! if (($config = $this->get('phpbb_config')) && ($use_cache) ) { return $config; *************** *** 107,115 **** * @return unknown */ ! function obtain_mxbb_config($force_refresh = false) { global $db; ! if ( ($config = $this->get('mxbb_config')) && !($force_refresh) ) { return $config; --- 107,115 ---- * @return unknown */ ! function obtain_mxbb_config($use_cache = true) { global $db; ! if ( ($config = $this->get('mxbb_config')) && ($use_cache) ) { return $config; Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** mx_functions_phpbb.php 16 Jan 2008 04:00:48 -0000 1.39 --- mx_functions_phpbb.php 18 Jan 2008 10:28:37 -0000 1.40 *************** *** 19,24 **** // Note: These functions will later be accessible wrapped as phpBBX::orig_functionname() // ! include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions.' . $phpEx); ! include_once($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); // --- 19,24 ---- // Note: These functions will later be accessible wrapped as phpBBX::orig_functionname() // ! include($mx_root_path . 'includes/shared/phpbb2/includes/functions.' . $phpEx); ! include($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); // *************** *** 315,324 **** global $mx_starttime, $mx_page, $mx_block, $mx_user, $mx_request_vars, $mx_cache, $tplEx; //$default_lang = $mx_user->get_old_lang($board_config['default_lang']); $default_lang = $mx_user->lang['default_lang']; if(defined('HAS_DIED')) { ! print_r("mx_message_die() was called multiple times. This isn't supposed to happen. Was mx_message_die() used in page_tail.php? <br /><br />"); } --- 315,372 ---- global $mx_starttime, $mx_page, $mx_block, $mx_user, $mx_request_vars, $mx_cache, $tplEx; + static $msg_history; + //$default_lang = $mx_user->get_old_lang($board_config['default_lang']); $default_lang = $mx_user->lang['default_lang']; + if( !isset($msg_history) ) + { + $msg_history = array(); + } + $msg_history[] = array( + 'msg_code' => $msg_code, + 'msg_text' => $msg_text, + 'msg_title' => $msg_title, + 'err_line' => $err_line, + 'err_file' => $err_file, + 'sql' => $sql + ); + if(defined('HAS_DIED')) { ! // ! // This message is printed at the end of the report. ! // Of course, you can change it to suit your own needs. ;-) ! // ! $custom_error_message = 'Please, contact the %swebmaster%s. Thank you.'; ! if ( !empty($board_config) && !empty($board_config['board_email']) ) ! { ! $custom_error_message = sprintf($custom_error_message, '<a href="mailto:' . $board_config['board_email'] . '">', '</a>'); ! } ! else ! { ! $custom_error_message = sprintf($custom_error_message, '', ''); ! } ! echo "<html>\n<body>\n<b>Critical Error!</b><br />\nmx_message_die() was called multiple times.<br /> <hr />"; ! for( $i = 0; $i < count($msg_history); $i++ ) ! { ! echo '<b>Error #' . ($i+1) . "</b>\n<br />\n"; ! if( !empty($msg_history[$i]['msg_title']) ) ! { ! echo '<b>' . $msg_history[$i]['msg_title'] . "</b>\n<br />\n"; ! } ! echo $msg_history[$i]['msg_text'] . "\n<br /><br />\n"; ! if( !empty($msg_history[$i]['err_line']) ) ! { ! echo '<b>Line :</b> ' . $msg_history[$i]['err_line'] . '<br /><b>File :</b> ' . $msg_history[$i]['err_file'] . "</b>\n<br />\n"; ! } ! if( !empty($msg_history[$i]['sql']) ) ! { ! echo '<b>SQL :</b> ' . $msg_history[$i]['sql'] . "\n<br />\n"; ! } ! echo " <hr />\n"; ! } ! echo $custom_error_message . '<hr /><br clear="all">'; ! die("</body>\n</html>"); } |