mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
#19459631 중복 파일 확인 제거 && file_exist 대신 is_readable 함수 사용
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8061 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e8970de718
commit
7bb4dc138d
1 changed files with 11 additions and 4 deletions
|
|
@ -506,14 +506,21 @@
|
|||
global $lang;
|
||||
if(!is_object($lang)) $lang = new stdClass;
|
||||
if(!$this->lang_type) return;
|
||||
|
||||
if(substr($path,-1)!='/') $path .= '/';
|
||||
$filename = sprintf('%s%s.lang.php', $path, $this->lang_type);
|
||||
if(!file_exists($filename)) $filename = sprintf('%s%s.lang.php', $path, 'ko');
|
||||
if(!file_exists($filename)) return;
|
||||
$path_tpl = $path.'%s.lang.php';
|
||||
$filename = sprintf($path_tpl, $this->lang_type);
|
||||
$langs = array('ko','en'); // this will be configurable.
|
||||
while(!is_readable($filename) && $langs[0]) {
|
||||
$filename = sprintf($path_tpl, array_shift($langs));
|
||||
}
|
||||
if(!is_readable($filename)) return;
|
||||
|
||||
if(!is_array($this->loaded_lang_files)) $this->loaded_lang_files = array();
|
||||
if(in_array($filename, $this->loaded_lang_files)) return;
|
||||
$this->loaded_lang_files[] = $filename;
|
||||
if(file_exists($filename)) @include($filename);
|
||||
|
||||
@include($filename);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue