mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 14:22:54 +09:00
Fix Context::loadLang() compatibility when lang.xml is specified
This commit is contained in:
parent
1a3e1f1653
commit
8ca0ca4a47
2 changed files with 10 additions and 1 deletions
|
|
@ -854,8 +854,9 @@ class Context
|
|||
*/
|
||||
public static function loadLang($path)
|
||||
{
|
||||
if (preg_match('@/(modules|addons|plugins)/([a-z0-9_]+)/lang/?$@', str_replace('\\', '/', $path), $matches))
|
||||
if (preg_match('@/(modules|addons|plugins|widgets)/([a-zA-Z0-9_-]+)/lang/?(?:lang\.xml)?$@', str_replace('\\', '/', $path), $matches))
|
||||
{
|
||||
$path = \RX_BASEDIR . $matches[1] . '/' . $matches[2] . '/lang';
|
||||
$plugin_name = $matches[2];
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue