|
From: FlorinCB <ory...@us...> - 2008-07-09 14:54:00
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17137 Modified Files: mx_functions_phpbb.php mx_functions_style.php Log Message: get_old_lang -> get_phpbb_lang Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** mx_functions_style.php 26 Jun 2008 22:02:00 -0000 1.75 --- mx_functions_style.php 9 Jul 2008 14:53:55 -0000 1.76 *************** *** 561,567 **** // // Now, $this->lang['default_lang'] is populated. But do we have a mathing MX-Publisher lang file? ! // Note: $this->get_old_lang() is used to translate phpBB3 lang keys/paths to old ways, eg to ensure lang_english and not lang_en. // ! if ( !file_exists(@phpBB2::phpbb_realpath($mx_root_path . 'language/lang_' . $this->get_old_lang($this->lang['default_lang']) . '/lang_main.'.$phpEx)) ) { if ( $this->data['user_id'] != ANONYMOUS || $this->data['user_id'] != 1 ) --- 561,567 ---- // // Now, $this->lang['default_lang'] is populated. But do we have a mathing MX-Publisher lang file? ! // Note: $this->get_phpbb_lang() is used to translate phpBB3 lang keys/paths to old ways, eg to ensure lang_english and not lang_en. // ! if ( !file_exists(@phpBB2::phpbb_realpath($mx_root_path . 'language/lang_' . $this->get_phpbb_lang($this->lang['default_lang']) . '/lang_main.'.$phpEx)) ) { if ( $this->data['user_id'] != ANONYMOUS || $this->data['user_id'] != 1 ) *************** *** 575,585 **** // This is a long shot since it means serious errors in the setup to reach here, // but english is part of a new install so it's worth us trying ! //$this->lang['default_lang'] = $this->get_old_lang('en'); //this will not work with sessions $this->lang['default_lang'] = 'en'; } ! if ( !file_exists(@phpBB2::phpbb_realpath($mx_root_path . 'language/lang_' . $this->get_old_lang($this->lang['default_lang']) . '/lang_main.'.$phpEx)) ) { ! mx_message_die(CRITICAL_ERROR, 'Could not locate valid language pack: ' . $mx_root_path . 'language/lang_' . $this->get_old_lang($this->lang['default_lang']) . '/lang_main.'.$phpEx); } } --- 575,585 ---- // This is a long shot since it means serious errors in the setup to reach here, // but english is part of a new install so it's worth us trying ! //$this->lang['default_lang'] = $this->get_phpbb_lang('en'); //this will not work with sessions $this->lang['default_lang'] = 'en'; } ! if ( !file_exists(@phpBB2::phpbb_realpath($mx_root_path . 'language/lang_' . $this->get_phpbb_lang($this->lang['default_lang']) . '/lang_main.'.$phpEx)) ) { ! mx_message_die(CRITICAL_ERROR, 'Could not locate valid language pack: ' . $mx_root_path . 'language/lang_' . $this->get_phpbb_lang($this->lang['default_lang']) . '/lang_main.'.$phpEx); } } *************** *** 613,617 **** $board_config['phpbb_lang'] = $this->lang['default_lang']; ! $board_config['default_lang'] = $this->get_old_lang($this->lang['default_lang']); // This will expand the lang name switch (PORTAL_BACKEND) --- 613,617 ---- $board_config['phpbb_lang'] = $this->lang['default_lang']; ! $board_config['default_lang'] = $this->get_phpbb_lang($this->lang['default_lang']); // This will expand the lang name switch (PORTAL_BACKEND) *************** *** 1143,1147 **** else { ! $img_lang = ($this->lang['default_lang']) ? $this->get_old_lang($this->lang['default_lang']) : (($board_config['default_lang']) ? $board_config['default_lang'] : 'english'); } --- 1143,1147 ---- else { ! $img_lang = ($this->lang['default_lang']) ? $this->get_phpbb_lang($this->lang['default_lang']) : (($board_config['default_lang']) ? $board_config['default_lang'] : 'english'); } *************** *** 1274,1278 **** global $lang, $board_config, $mx_block, $phpEx, $mx_root_path; ! $default_lang = ($this->lang['default_lang']) ? $this->get_old_lang($this->lang['default_lang']) : $board_config['default_lang']; if (empty($default_lang)) --- 1274,1278 ---- global $lang, $board_config, $mx_block, $phpEx, $mx_root_path; ! $default_lang = ($this->lang['default_lang']) ? $this->get_phpbb_lang($this->lang['default_lang']) : $board_config['default_lang']; if (empty($default_lang)) *************** *** 1344,1349 **** } ! // USE: $default_lang = $mx_user->get_old_lang($board_config['default_lang']); ! function get_old_lang($lang) { if ( PORTAL_BACKEND != 'phpbb3' ) --- 1344,1349 ---- } ! // USE: $default_lang = $mx_user->get_phpbb_lang($board_config['default_lang']); ! function get_phpbb_lang($lang) { if ( PORTAL_BACKEND != 'phpbb3' ) Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** mx_functions_phpbb.php 8 Jul 2008 22:01:34 -0000 1.70 --- mx_functions_phpbb.php 9 Jul 2008 14:53:55 -0000 1.71 *************** *** 261,265 **** } ! //$default_lang = $mx_user->get_old_lang($board_config['default_lang']); $default_lang = ($mx_user->lang['default_lang']) ? $mx_user->lang['default_lang'] : $board_config['default_lang']; --- 261,265 ---- } ! //$default_lang = $mx_user->get_phpbb_lang($board_config['default_lang']); $default_lang = ($mx_user->lang['default_lang']) ? $mx_user->lang['default_lang'] : $board_config['default_lang']; *************** *** 402,406 **** $mx_page->init( $page_id ); ! $default_lang = ($mx_user->lang['default_lang']) ? $mx_user->get_old_lang($mx_user->lang['default_lang']) : $board_config['default_lang']; if ( empty($default_lang) ) --- 402,406 ---- $mx_page->init( $page_id ); ! $default_lang = ($mx_user->lang['default_lang']) ? $mx_user->get_phpbb_lang($mx_user->lang['default_lang']) : $board_config['default_lang']; if ( empty($default_lang) ) |