use eval() for lang code when first install

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9053 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2011-09-06 09:17:00 +00:00
parent e239d46f1c
commit d10698d7fb
2 changed files with 28 additions and 6 deletions

View file

@ -468,7 +468,22 @@ class Context {
if(in_array($filename, $self->loaded_lang_files)) return;
$self->loaded_lang_files[] = $filename;
@include($filename);
if (is_readable($filename))
@include($filename);
else
$self->_evalxmlLang($path);
}
function _evalxmlLang($path) {
global $lang;
if(substr($path,-1)!='/') $path .= '/';
$file = $path.'lang.xml';
$oXmlLangParser = new XmlLangParser($file, $this->lang_type);
$content = $oXmlLangParser->getCompileContent();
eval($content);
}
function _loadXmlLang($path) {