• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

XOOPS Cube Legacy base repository


コミットメタ情報

リビジョン9d6ff8ea87cfcbe0bdc494e257429768d0fa132c (tree)
日時2012-08-17 19:03:06
作者HIKAWA Kilica <kilica.hikawa@gmai...>
コミッターHIKAWA Kilica

ログメッセージ

Merge pull request #25 from nao-pon/load_lang_trust

legacy: load trust side language file

変更サマリ

差分

--- a/html/modules/legacy/kernel/Legacy_LanguageManager.class.php
+++ b/html/modules/legacy/kernel/Legacy_LanguageManager.class.php
@@ -150,16 +150,33 @@ class Legacy_LanguageManager extends XCube_LanguageManager
150150 */
151151 function _loadLanguage($dirname, $fileBodyName)
152152 {
153- if (!$this->_loadFile(XOOPS_MODULE_PATH . '/' . $dirname . '/language/' . $this->mLanguageName . '/' . $fileBodyName . '.php')) {
154- $this->_loadFile(XOOPS_MODULE_PATH . '/' . $dirname . '/language/' . $this->getFallbackLanguage() . '/' . $fileBodyName . '.php');
153+ static $trust_dirnames = array();
154+ if (!isset($trust_dirnames[$dirname])) {
155+ $trust_dirnames[$dirname] = Legacy_Utils::getTrustDirnameByDirname($dirname);
155156 }
157+ (
158+ $this->_loadFile(XOOPS_MODULE_PATH . '/' . $dirname . '/language/' . $this->mLanguageName . '/' . $fileBodyName . '.php')
159+ ||
160+ $this->_loadFile(XOOPS_MODULE_PATH . '/' . $dirname . '/language/' . $this->getFallbackLanguage() . '/' . $fileBodyName . '.php')
161+ ||
162+ (
163+ $trust_dirnames[$dirname] &&
164+ (
165+ $this->_loadFile(XOOPS_TRUST_PATH . '/modules/' . $trust_dirnames[$dirname] . '/language/' . $this->mLanguageName . '/' . $fileBodyName . '.php', $dirname)
166+ ||
167+ $this->_loadFile(XOOPS_TRUST_PATH . '/modules/' . $trust_dirnames[$dirname] . '/language/' . $this->getFallbackLanguage() . '/' . $fileBodyName . '.php', $dirname)
168+ )
169+ )
170+ );
156171 }
157172
158173
159174 /**
160175 * @access protected
176+ * @param $filename A filename.
177+ * @param $dirname A dirname of module. (for D3 module)
161178 */
162- function _loadFile($filename)
179+ function _loadFile($filename, $mydirname = null)
163180 {
164181 if (file_exists($filename)) {
165182 require_once $filename;