mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-24 04:42:14 +09:00
issue 160, fixed eval lang code
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9128 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
338b70f0b3
commit
662b3f0915
1 changed files with 12 additions and 4 deletions
|
|
@ -466,16 +466,21 @@ class Context {
|
|||
|
||||
if(!is_array($self->loaded_lang_files)) $self->loaded_lang_files = array();
|
||||
if(in_array($filename, $self->loaded_lang_files)) return;
|
||||
$self->loaded_lang_files[] = $filename;
|
||||
|
||||
if (is_readable($filename))
|
||||
if ($filename && is_readable($filename)){
|
||||
$self->loaded_lang_files[] = $filename;
|
||||
@include($filename);
|
||||
else
|
||||
}else{
|
||||
$self->_evalxmlLang($path);
|
||||
}
|
||||
}
|
||||
|
||||
function _evalxmlLang($path) {
|
||||
global $lang;
|
||||
|
||||
$_path = 'eval://'.$path;
|
||||
|
||||
if(in_array($_path, $this->loaded_lang_files)) return;
|
||||
|
||||
if(substr($path,-1)!='/') $path .= '/';
|
||||
$file = $path.'lang.xml';
|
||||
|
|
@ -483,7 +488,10 @@ class Context {
|
|||
$oXmlLangParser = new XmlLangParser($file, $this->lang_type);
|
||||
$content = $oXmlLangParser->getCompileContent();
|
||||
|
||||
eval($content);
|
||||
if ($content){
|
||||
$this->loaded_lang_files[] = $_path;
|
||||
eval($content);
|
||||
}
|
||||
}
|
||||
|
||||
function _loadXmlLang($path) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue