Remove unnecessary condition in autoloader for custom namespaces

This commit is contained in:
Kijin Sung 2023-08-12 21:55:20 +09:00
parent a7954506f6
commit 58d6d51e9f

View file

@ -144,11 +144,8 @@ spl_autoload_register(function($class_name)
$dir = RX_BASEDIR . $plugin_path . '/' . strtolower($matches[2]); $dir = RX_BASEDIR . $plugin_path . '/' . strtolower($matches[2]);
$filename1 = $dir . $matches[3] . '.php'; $filename1 = $dir . $matches[3] . '.php';
$filename2 = $dir . strtolower($matches[3]) . '.php'; $filename2 = $dir . strtolower($matches[3]) . '.php';
if ($matches[1] !== 'Framework' && !empty($matches[3])) $lang_plugin = array_last(explode('/', $plugin_path));
{ $lang_path = RX_BASEDIR . $plugin_path . '/lang';
$lang_plugin = array_last(explode('/', $plugin_path));
$lang_path = RX_BASEDIR . $plugin_path . '/lang';
}
} }
} }