|
From: OryNider <ory...@us...> - 2007-12-14 02:14:01
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16751/includes Modified Files: mx_functions_phpbb.php mx_functions_style.php Log Message: 10x to Culprit I fixed more bugs ;) Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** mx_functions_style.php 19 Nov 2007 16:39:56 -0000 1.24 --- mx_functions_style.php 14 Dec 2007 02:13:26 -0000 1.25 *************** *** 611,616 **** } ! $board_config['default_lang'] = $this->get_old_lang($this->lang['default_lang']); // ? ! include($mx_root_path . 'includes/shared/phpbb2/language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx); // Also include phpBB lang keys include($mx_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx); --- 611,622 ---- } ! $board_config['default_lang'] = $this->get_old_lang($this->lang['default_lang']); // This will expand the lang name ! ! if( !file_exists(@phpBB2::phpbb_realpath($mx_root_path . 'includes/shared/phpbb2/language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx)) ) ! { ! @mx_message_die(GENERAL_ERROR, "Could not locate user language file: lang_main.php that most be uploaded in your includes/shared/phpbb2/language/your_language/ folder"); ! $board_config['default_lang'] = 'english'; ! } ! include($mx_root_path . 'includes/shared/phpbb2/language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx); // Also include phpBB lang keys include($mx_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx); Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** mx_functions_phpbb.php 9 Sep 2007 16:48:17 -0000 1.33 --- mx_functions_phpbb.php 14 Dec 2007 02:13:26 -0000 1.34 *************** *** 183,186 **** --- 183,187 ---- case 'phpbb3': $smiley_url = 'smiley_url'; + $board_config['smilies_path'] = str_replace("smiles", "smilies", $board_config['smilies_path']); break; } *************** *** 199,202 **** --- 200,204 ---- mx_message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql); } + $smilies = $db->sql_fetchrowset($result); *************** *** 343,351 **** } if( empty($userdata) && ( $msg_code == GENERAL_MESSAGE || $msg_code == GENERAL_ERROR )) { $mx_user->init($user_ip, - ( 1000 + $page_id )); } ! // // If the header hasn't been output then do it --- 345,380 ---- } + + 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']); ! } ! // // If the header hasn't been output then do it *************** *** 353,367 **** if ( !defined('HEADER_INC') && $msg_code != CRITICAL_ERROR ) { ! if ( empty($lang) ) { ! if ( !empty($default_lang) ) { include($mx_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx); ! include($phpbb_root_path . 'language/lang_' . $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); } } --- 382,396 ---- 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); } } *************** *** 369,383 **** $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(); } --- 398,413 ---- $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; ! } } *************** *** 436,440 **** else { ! //include($mx_root_path . 'language/lang_' . $default_lang . '/lang_phpbb_main.' . $phpEx); // Also include phpBB lang keys } --- 466,470 ---- else { ! include($mx_root_path . 'includes/shared/phpbb2/language/lang_' . $default_lang . '/lang_main.' . $phpEx); // Also include phpBB lang keys } *************** *** 451,454 **** --- 481,485 ---- } + // // Add on DEBUG info if we've enabled debug mode and this is an error. This |