Add regexp to config for custom namespaces

This commit is contained in:
Kijin Sung 2023-08-11 02:04:59 +09:00
parent 4d4d454af0
commit 4f9f641067
2 changed files with 28 additions and 2 deletions

View file

@ -1673,6 +1673,14 @@ class ModuleModel extends Module
$info->need_update = true;
}
}
foreach ($namespaces as $name => $path)
{
$attached_module = preg_replace('!^modules/!', '', $path);
if ($attached_module === $module_name && !in_array($name, $module_action_info->namespaces ?? []))
{
$info->need_update = true;
}
}
// Check if all prefixes are registered.
foreach ($module_action_info->prefixes ?? [] as $name)