mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-22 03:42:18 +09:00
Use associative array to store custom namespaces
This commit is contained in:
parent
911772393a
commit
a7954506f6
5 changed files with 22 additions and 22 deletions
|
|
@ -1738,12 +1738,12 @@ class ModuleModel extends Module
|
|||
$namespaces = config('namespaces') ?? [];
|
||||
foreach ($module_action_info->namespaces ?? [] as $name)
|
||||
{
|
||||
if(!isset($namespaces[$name]))
|
||||
if(!isset($namespaces['mapping'][$name]))
|
||||
{
|
||||
$info->need_update = true;
|
||||
}
|
||||
}
|
||||
foreach ($namespaces as $name => $path)
|
||||
foreach ($namespaces['mapping'] ?? [] as $name => $path)
|
||||
{
|
||||
$attached_module = preg_replace('!^modules/!', '', $path);
|
||||
if ($attached_module === $module_name && !in_array($name, $module_action_info->namespaces ?? []))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue