Allow comma as a separator for module action methods

This commit is contained in:
Kijin Sung 2024-03-24 22:29:53 +09:00
parent 289a249569
commit f419353013
2 changed files with 2 additions and 2 deletions

View file

@ -99,7 +99,7 @@ class ModuleActionParser extends BaseParser
$method_attr = trim($action['method'] ?? ''); $method_attr = trim($action['method'] ?? '');
if ($method_attr) if ($method_attr)
{ {
$methods = explode('|', strtoupper($method_attr)); $methods = array_map('trim', preg_split('/[|,]/', strtoupper($method_attr)));
} }
elseif ($action_type === 'controller' || starts_with('proc', $action_name)) elseif ($action_type === 'controller' || starts_with('proc', $action_name))
{ {

View file

@ -4,7 +4,7 @@
<actions> <actions>
<!-- Dashboard --> <!-- Dashboard -->
<action name="dispAdminIndex" class="Controllers\Dashboard" index="true" /> <action name="dispAdminIndex" class="Controllers\Dashboard" index="true" />
<action name="procAdminLogout" class="Controllers\Dashboard" method="GET|POST" /> <action name="procAdminLogout" class="Controllers\Dashboard" method="GET,POST" />
<!-- Maintenance --> <!-- Maintenance -->
<action name="procAdminRecompileCacheFile" class="Controllers\Maintenance\CacheReset" /> <action name="procAdminRecompileCacheFile" class="Controllers\Maintenance\CacheReset" />
<action name="dispAdminCleanupList" class="Controllers\Maintenance\Cleanup" /> <action name="dispAdminCleanupList" class="Controllers\Maintenance\Cleanup" />