|
From: OryNider <ory...@us...> - 2008-01-13 18:38:46
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26168 Modified Files: Tag: core28x mx_functions_ch.php mx_functions_core.php mx_functions_phpbb.php mx_functions_style.php page_header.php page_tail.php template.php Log Message: replaceing message_die with mx_message_die Index: mx_functions_ch.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_ch.php,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** mx_functions_ch.php 30 Jan 2007 16:26:07 -0000 1.8 --- mx_functions_ch.php 13 Jan 2008 18:38:40 -0000 1.8.2.1 *************** *** 58,62 **** if ( file_exists($phpbb_root_path.'install_cat') && !defined('IN_LOGIN') && !defined('IN_INSTALL') ) { ! message_die(GENERAL_MESSAGE, 'Please ensure the install_cat/ directory is deleted'); } --- 58,62 ---- if ( file_exists($phpbb_root_path.'install_cat') && !defined('IN_LOGIN') && !defined('IN_INSTALL') ) { ! mx_message_die(GENERAL_MESSAGE, 'Please ensure the install_cat/ directory is deleted'); } Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.52.2.1 retrieving revision 1.52.2.2 diff -C2 -d -r1.52.2.1 -r1.52.2.2 *** mx_functions_core.php 12 Aug 2007 22:29:16 -0000 1.52.2.1 --- mx_functions_core.php 13 Jan 2008 18:38:40 -0000 1.52.2.2 *************** *** 74,80 **** FROM " . CONFIG_TABLE; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql); } --- 74,80 ---- FROM " . CONFIG_TABLE; ! if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt query config information', '', __LINE__, __FILE__, $sql ); } *************** *** 126,130 **** $db->sql_freeresult( $result ); $this->put('mxbb_config', $config); - return ( $config ); } --- 126,129 ---- Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.32.2.1 retrieving revision 1.32.2.2 diff -C2 -d -r1.32.2.1 -r1.32.2.2 *** mx_functions_phpbb.php 6 Jan 2008 22:27:08 -0000 1.32.2.1 --- mx_functions_phpbb.php 13 Jan 2008 18:38:40 -0000 1.32.2.2 *************** *** 118,124 **** global $mx_starttime, $mx_page, $mx_block, $mx_user, $mx_request_vars, $mx_cache; if(defined('HAS_DIED')) { ! die("message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php?"); } --- 118,127 ---- global $mx_starttime, $mx_page, $mx_block, $mx_user, $mx_request_vars, $mx_cache; + //$default_lang = $board_config['default_lang']; + $default_lang = $mx_user->lang['default_lang']; + if(defined('HAS_DIED')) { ! die("mx_message_die() was called multiple times. This isn't supposed to happen. Was mx_message_die() used in page_tail.php?"); } *************** *** 153,165 **** } if( empty($userdata) && ( $msg_code == GENERAL_MESSAGE || $msg_code == GENERAL_ERROR )) { - if( !is_object($mx_user)) - { - die("This hosting or server is using a cache optimizer not currently supported by mxBB."); - } $mx_user->init($user_ip, - ( 1000 + $page_id )); } ! // // If the header hasn't been output then do it --- 156,192 ---- } + + if( !is_object($mx_user)) + { + $mx_user = new mx_user(); + } + + if( !is_object($mx_page)) + { + $mx_page = new mx_page(); + } + + if( !is_object($mx_request_vars)) + { + $mx_request_vars = new mx_request_vars(); + } + + if ( empty($page_id) ) + { + $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); + } + if( empty($userdata) && ( $msg_code == GENERAL_MESSAGE || $msg_code == GENERAL_ERROR )) { $mx_user->init($user_ip, - ( 1000 + $page_id )); } ! ! if ( empty($theme) ) ! { ! // - populate $theme ! //$theme = $mx_user->_setup_style($board_config['default_style']); ! } ! //$default_lang = $board_config['default_lang']; ! $default_lang = $mx_user->lang['default_lang']; // // If the header hasn't been output then do it *************** *** 167,181 **** if ( !defined('HEADER_INC') && $msg_code != CRITICAL_ERROR ) { ! if ( empty($lang) ) { ! if ( !empty($board_config['default_lang']) ) { ! include($mx_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx); ! include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx); } else { include($mx_root_path . 'language/lang_english/lang_main.'.$phpEx); ! include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx); } } --- 194,208 ---- if ( !defined('HEADER_INC') && $msg_code != CRITICAL_ERROR ) { ! if ( empty($lang) || empty($lang['Board_disable']) ) { ! if ( !empty($default_lang) && file_exists(@phpBB2::phpbb_realpath($mx_root_path . 'includes/shared/phpbb2/language/lang_' . $default_lang . '/lang_main.'.$phpEx)) ) { ! include($mx_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx); ! include($mx_root_path . 'includes/shared/phpbb2/language/lang_' . $default_lang . '/lang_main.' . $phpEx); // Also include phpBB lang keys } else { include($mx_root_path . 'language/lang_english/lang_main.'.$phpEx); ! include($mx_root_path . 'includes/shared/phpbb2/language/lang_english/lang_main.'.$phpEx); } } *************** *** 183,197 **** $mx_page->page_title = !empty($msg_title) ? $msg_title : $lang['Information']; ! if ( empty($template) ) ! { ! //$template = new mx_Template($mx_root_path . 'templates/' . $board_config['board_template']); ! $template = new mx_Template($mx_root_path . 'templates/' . $mx_user->template_name); ! } ! if ( empty($theme) ) { ! // ! // instatiate the mx_user class ! // ! $mx_user = new mx_user(); } --- 210,225 ---- $mx_page->page_title = !empty($msg_title) ? $msg_title : $lang['Information']; ! if( !is_object($template) ) { ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $template = new mx_Template($mx_root_path . 'templates/' . $mx_user->template_name); ! break; ! case 'phpbb3': ! $mx_user->init_style(); ! break; ! } } *************** *** 242,247 **** // available so we're going to dump out a simple echo'd statement // ! include($mx_root_path . 'language/lang_english/lang_main.'.$phpEx); ! include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx); if ( $msg_text == '' ) --- 270,283 ---- // available so we're going to dump out a simple echo'd statement // ! @include($mx_root_path . 'language/lang_english/lang_main.'.$phpEx); ! ! if (file_exists($phpbb_root_path . 'language/lang_' .$default_lang . '/lang_main.' . $phpEx)) ! { ! include($phpbb_root_path . 'language/lang_' . $default_lang . '/lang_main.' . $phpEx); // Also include phpBB lang keys ! } ! else ! { ! include($mx_root_path . 'includes/shared/phpbb2/language/lang_' . $default_lang . '/lang_main.' . $phpEx); // Also include phpBB lang keys ! } if ( $msg_text == '' ) *************** *** 252,256 **** if ( $msg_title == '' ) { ! $msg_title = 'phpBB : <b>' . $lang['Critical_Error'] . '</b>'; } break; --- 288,292 ---- if ( $msg_title == '' ) { ! $msg_title = 'mxBB : <b>' . $lang['Critical_Error'] . '</b>'; } break; *************** *** 721,725 **** if ( !($result = $db->sql_query($sql, 600)) ) { ! message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql); } --- 757,761 ---- if ( !($result = $db->sql_query($sql, 600)) ) { ! mx_message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql); } *************** *** 791,795 **** if ( !($result = $db->sql_query($sql, 300)) ) { ! message_die(GENERAL_ERROR, "Couldn't query themes table", "", __LINE__, __FILE__, $sql); } --- 827,831 ---- if ( !($result = $db->sql_query($sql, 300)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't query themes table", "", __LINE__, __FILE__, $sql); } *************** *** 993,997 **** if( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, "Couldn't get list of groups", '', __LINE__, __FILE__, $sql); } --- 1029,1033 ---- if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't get list of groups", '', __LINE__, __FILE__, $sql); } Index: template.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/template.php,v retrieving revision 1.18.2.2 retrieving revision 1.18.2.3 diff -C2 -d -r1.18.2.2 -r1.18.2.3 *** template.php 12 Sep 2007 19:36:09 -0000 1.18.2.2 --- template.php 13 Jan 2008 18:38:41 -0000 1.18.2.3 *************** *** 499,503 **** if ( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Wasn\'t able to access posts', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) --- 499,503 ---- if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Wasn\'t able to access posts', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) *************** *** 512,516 **** if ( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Wasn\'t able to access topics', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) --- 512,516 ---- if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Wasn\'t able to access topics', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) *************** *** 537,541 **** if ( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Wasn\'t able to access forums', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) --- 537,541 ---- if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Wasn\'t able to access forums', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.17.2.5 retrieving revision 1.17.2.6 diff -C2 -d -r1.17.2.5 -r1.17.2.6 *** mx_functions_style.php 28 Oct 2007 17:18:00 -0000 1.17.2.5 --- mx_functions_style.php 13 Jan 2008 18:38:40 -0000 1.17.2.6 *************** *** 326,330 **** if ( !file_exists(@phpbb_realpath($mx_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) ) { ! message_die(CRITICAL_ERROR, 'Could not locate valid language pack'); } } --- 326,330 ---- if ( !file_exists(@phpbb_realpath($mx_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) ) { ! mx_message_die(CRITICAL_ERROR, 'Could not locate valid language pack'); } } *************** *** 340,344 **** if ( !($result = $db->sql_query($sql)) ) { ! message_die(CRITICAL_ERROR, 'Could not update user language info'); } --- 340,344 ---- if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(CRITICAL_ERROR, 'Could not update user language info'); } *************** *** 353,357 **** if ( !($result = $db->sql_query($sql)) ) { ! message_die(CRITICAL_ERROR, 'Could not update user language info'); } } --- 353,357 ---- if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(CRITICAL_ERROR, 'Could not update user language info'); } } |