Fix namespace regexp not capturing group properly

Conory/Abc/Controllers/Config/Index
→ Group 2: Config/
This commit is contained in:
conory 2023-08-27 01:20:57 +09:00
parent 2b55d8cc91
commit 0f0dbbb40c

View file

@ -1491,7 +1491,7 @@ class ModuleController extends Module
if (count($regexp))
{
usort($regexp, function($a, $b) { return strlen($b) - strlen($a); });
$namespaces['regexp'] = '!^(' . implode('|', $regexp) . ')/(\\w+/)*(\\w+)$!';
$namespaces['regexp'] = '!^(' . implode('|', $regexp) . ')/((?:\\w+/)*)(\\w+)$!';
}
// Update system configuration.