Minahito
minah****@users*****
2006年 1月 25日 (水) 16:13:31 JST
Index: xoops2jp/html/modules/base/kernel/Legacy_LanguageManager.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_LanguageManager.class.php:1.1.2.1 xoops2jp/html/modules/base/kernel/Legacy_LanguageManager.class.php:1.1.2.2 --- xoops2jp/html/modules/base/kernel/Legacy_LanguageManager.class.php:1.1.2.1 Mon Dec 26 18:03:49 2005 +++ xoops2jp/html/modules/base/kernel/Legacy_LanguageManager.class.php Wed Jan 25 16:13:31 2006 @@ -1,5 +1,5 @@ <?php -// $Id: Legacy_LanguageManager.class.php,v 1.1.2.1 2005/12/26 09:03:49 minahito Exp $ +// $Id: Legacy_LanguageManager.class.php,v 1.1.2.2 2006/01/25 07:13:31 minahito Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -33,10 +33,9 @@ function loadMainLanguage() { - if (file_exists(XOOPS_ROOT_PATH . "/modules/base/language/" . $this->mLanguageName . "/global.php")) - require_once XOOPS_ROOT_PATH . "/modules/base/language/" . $this->mLanguageName . "/global.php"; - else - require_once XOOPS_ROOT_PATH."/modules/base/language/english/global.php"; + if (!$this->_loadFile(XOOPS_ROOT_PATH . "/modules/base/language/" . $this->mLanguageName . "/global.php")) { + $this->_loadFile(XOOPS_ROOT_PATH."/modules/base/language/english/global.php"); + } // Now, if XOOPS_USE_MULTIBYTES isn't defined, set zero to it. if (!defined("XOOPS_USE_MULTIBYTES")) { @@ -48,9 +47,7 @@ { if (strpos($type,'.') === false) { $filename = XOOPS_ROOT_PATH . "/language/" . $this->mLanguageName . "/" . $type . ".php"; - if ($this->_loadFile($filename)) { - require_once $filename; - } else { + if (!$this->_loadFile($filename)) { $filename = XOOPS_ROOT_PATH . "/language/english/" . $type . ".php"; $this->_loadFile($filename); } @@ -103,6 +100,7 @@ { if (file_exists($filename)) { require_once $filename; + $checks[$filename] = true; return true; }