|
From: OryNider <ory...@us...> - 2008-02-12 13:12:10
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv365 Modified Files: mx_functions_style.php Log Message: Module language incluzion error fixed in someting like: Module main language file ./modules/mx_phpbb3/language/lang_english/lang_main.php couldn't be opened. ;) Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** mx_functions_style.php 9 Feb 2008 22:11:35 -0000 1.43 --- mx_functions_style.php 12 Feb 2008 13:12:04 -0000 1.44 *************** *** 1250,1253 **** --- 1250,1261 ---- { 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)) + { + // - populate $default_lang + $default_lang= 'english'; + } if (!isset($this->loaded_langs[$mx_block->module_root_path])) *************** *** 1258,1268 **** // Read Module Main Language Definition // ------------------------------------------------------------------------- ! if ( !file_exists( $mx_root_path . $mx_block->module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) ! { ! include( $mx_root_path . $mx_block->module_root_path . 'language/lang_english/lang_main.' . $phpEx ); ! } ! else { ! include( $mx_root_path . $mx_block->module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); } } --- 1266,1275 ---- // Read Module Main Language Definition // ------------------------------------------------------------------------- ! if ((@include $mx_root_path . $mx_block->module_root_path . "language/lang_" . $default_lang . "/lang_main.$phpEx") === false) { ! if ((@include $mx_root_path . $mx_block->module_root_path . "language/lang_english/lang_main.$phpEx") === false) ! { ! mx_message_die(CRITICAL_ERROR, 'Module main language file ' . $mx_root_path . $mx_block->module_root_path . "language/lang_" . $default_lang . "/lang_main.$phpEx" . ' couldn\'t be opened.'); ! } } } *************** *** 1273,1286 **** // Read Module Admin Language Definition // ------------------------------------------------------------------------- ! if ( !file_exists( $mx_root_path . $mx_block->module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) ! { ! include( $mx_root_path . $mx_block->module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); ! } ! else { ! include( $mx_root_path . $mx_block->module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } } - $this->loaded_langs[$mx_block->module_root_path] = '1'; } --- 1280,1291 ---- // Read Module Admin Language Definition // ------------------------------------------------------------------------- ! if ((@include $mx_root_path . $mx_block->module_root_path . "language/lang_" . $default_lang . "/lang_admin.$phpEx") === false) { ! if ((@include $mx_root_path . $mx_block->module_root_path . "language/lang_english/lang_admin.$phpEx") === false) ! { ! mx_message_die(CRITICAL_ERROR, 'Modiule admin language file ' . $mx_root_path . $mx_block->module_root_path . "language/lang_" . $default_lang . "/lang_admin.$phpEx" . ' couldn\'t be opened.'); ! } } } $this->loaded_langs[$mx_block->module_root_path] = '1'; } |