mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Adjust loading priority of modules vs. plugins
This commit is contained in:
parent
14becbbad6
commit
2cdf9d0e2d
2 changed files with 8 additions and 4 deletions
|
|
@ -104,6 +104,10 @@ spl_autoload_register(function($class_name)
|
||||||
case 'rhymix/plu':
|
case 'rhymix/plu':
|
||||||
$filename = RX_BASEDIR . 'plugins/' . substr($lc_class_name, 15) . '.php';
|
$filename = RX_BASEDIR . 'plugins/' . substr($lc_class_name, 15) . '.php';
|
||||||
break;
|
break;
|
||||||
|
// Rhymix Module classes.
|
||||||
|
case 'rhymix/mod':
|
||||||
|
$filename = RX_BASEDIR . 'modules/' . substr($lc_class_name, 15) . '.php';
|
||||||
|
break;
|
||||||
// XE compatible classes.
|
// XE compatible classes.
|
||||||
default:
|
default:
|
||||||
if (isset($GLOBALS['RX_AUTOLOAD_FILE_MAP'][$lc_class_name]))
|
if (isset($GLOBALS['RX_AUTOLOAD_FILE_MAP'][$lc_class_name]))
|
||||||
|
|
|
||||||
|
|
@ -77,14 +77,14 @@ class Lang
|
||||||
{
|
{
|
||||||
$this->loadDirectory(\RX_BASEDIR . 'common/lang', 'common');
|
$this->loadDirectory(\RX_BASEDIR . 'common/lang', 'common');
|
||||||
}
|
}
|
||||||
elseif (file_exists(\RX_BASEDIR . "plugins/$name/lang"))
|
|
||||||
{
|
|
||||||
$this->loadDirectory(\RX_BASEDIR . "plugins/$name/lang", $name);
|
|
||||||
}
|
|
||||||
elseif (file_exists(\RX_BASEDIR . "modules/$name/lang"))
|
elseif (file_exists(\RX_BASEDIR . "modules/$name/lang"))
|
||||||
{
|
{
|
||||||
$this->loadDirectory(\RX_BASEDIR . "modules/$name/lang", $name);
|
$this->loadDirectory(\RX_BASEDIR . "modules/$name/lang", $name);
|
||||||
}
|
}
|
||||||
|
elseif (file_exists(\RX_BASEDIR . "plugins/$name/lang"))
|
||||||
|
{
|
||||||
|
$this->loadDirectory(\RX_BASEDIR . "plugins/$name/lang", $name);
|
||||||
|
}
|
||||||
elseif (file_exists(\RX_BASEDIR . "addons/$name/lang"))
|
elseif (file_exists(\RX_BASEDIR . "addons/$name/lang"))
|
||||||
{
|
{
|
||||||
$this->loadDirectory(\RX_BASEDIR . "addons/$name/lang", $name);
|
$this->loadDirectory(\RX_BASEDIR . "addons/$name/lang", $name);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue