mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Prevent Rhymix reserved namespaces from being registered as custom
This commit is contained in:
parent
5823253d60
commit
47996cb294
2 changed files with 7 additions and 2 deletions
|
|
@ -252,7 +252,7 @@ class ModuleActionParser extends BaseParser
|
|||
// Parse custom namespaces.
|
||||
foreach ($xml->namespaces->namespace ?: [] as $namespace)
|
||||
{
|
||||
$info->namespaces[] = strval($namespace['name']);
|
||||
$info->namespaces[] = trim($namespace['name'], '/\\');
|
||||
}
|
||||
|
||||
// Parse custom prefixes.
|
||||
|
|
|
|||
|
|
@ -1458,7 +1458,12 @@ class ModuleController extends Module
|
|||
// Add all namespaces defined by this module.
|
||||
foreach ($module_action_info->namespaces ?? [] as $name)
|
||||
{
|
||||
if(!isset($namespaces[$name]))
|
||||
if (preg_match('/^Rhymix\\\\/i', $name))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($namespaces[$name]))
|
||||
{
|
||||
$namespaces[$name] = 'modules/' . $module_name;
|
||||
$changed = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue