|
From: <rgr...@us...> - 2013-12-30 16:19:27
|
Revision: 12252
http://sourceforge.net/p/xoops/svn/12252
Author: rgriffith
Date: 2013-12-30 16:19:24 +0000 (Mon, 30 Dec 2013)
Log Message:
-----------
Fix #1246 -- Fallback to english for admin theme language files if no language specific file exists
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/theme.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/theme.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/theme.php 2013-12-29 16:04:19 UTC (rev 12251)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/theme.php 2013-12-30 16:19:24 UTC (rev 12252)
@@ -501,7 +501,7 @@
if (file_exists($GLOBALS['xoops']->path('language/' . $language . '/style.css'))) {
$this->addStylesheet($GLOBALS['xoops']->url('language/' . $language . '/style.css'));
}
- $this->addLanguage($type);
+ $this->addLanguage($type, $language);
// Load theme localization stylesheet and scripts if available
if (file_exists($this->path . '/language/' . $language . '/script.js')) {
$this->addScript($this->url . '/language/' . $language . '/script.js');
@@ -521,12 +521,13 @@
function addLanguage($type = "main", $language = null)
{
$language = is_null($language) ? $GLOBALS["xoopsConfig"]["language"] : $language;
- if (!file_exists($fileinc = $GLOBALS['xoops']->path($this->resourcePath("/language/{$language}/{$type}.php")))) {
- if (!file_exists($fileinc = $GLOBALS['xoops']->path($this->resourcePath( "/language/english/{$type}.php")))) {
+ if (!file_exists($fileinc = $this->path . "/language/{$language}/{$type}.php")) {
+ if (!file_exists($fileinc = $this->path . "/language/english/{$type}.php")) {
return false;
}
}
$ret = include_once $fileinc;
+
return $ret;
}
|