mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Fixed a bug for loading language files
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9576 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
54b5e078c6
commit
f8708a0595
1 changed files with 6 additions and 1 deletions
|
|
@ -437,6 +437,11 @@
|
|||
|
||||
if(!$isRemote) {
|
||||
if(!preg_match('@^\.?/@',$attr['target'])) $attr['target'] = './'.$attr['target'];
|
||||
if(substr($attr['target'], -5) == '/lang') {
|
||||
$pathinfo['dirname'] .= '/lang';
|
||||
$pathinfo['basename'] = '';
|
||||
$pathinfo['extension'] = 'xml';
|
||||
}
|
||||
|
||||
$relativeDir = $this->_getRelativeDir($pathinfo['dirname']);
|
||||
|
||||
|
|
@ -448,7 +453,7 @@
|
|||
case 'xml':
|
||||
if($isRemote || $doUnload) return '';
|
||||
// language file?
|
||||
if($pathinfo['basename'] == 'lang.xml' && substr($pathinfo['dirname'],-5) == '/lang') {
|
||||
if($pathinfo['basename'] == 'lang.xml' || substr($pathinfo['dirname'],-5) == '/lang') {
|
||||
$result = "Context::loadLang('{$relativeDir}');";
|
||||
} else {
|
||||
$result = "require_once('./classes/xml/XmlJsFilter.class.php');\$__xmlFilter=new XmlJsFilter('{$relativeDir}','{$pathinfo['basename']}');\$__xmlFilter->compile();";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue