fix Доп. проверка для имени класса для прохождения тестов

This commit is contained in:
origami11@yandex.ru 2022-12-16 12:38:01 +03:00
parent 36b7d93a98
commit d9b6faafc6
3 changed files with 7 additions and 6 deletions

View file

@ -14,7 +14,6 @@ use Exception,
ctiso\Filter\ActionAccess,
ctiso\View\View,
ctiso\Controller\State;
/**
* Контроллер страниц
*/
@ -219,10 +218,12 @@ class Action
if ($access == null || $access->checkAction($name)) {
$moduleName = explode("\\", strtolower(get_class($this)));
if (count($moduleName) > 2) {
array_shift($moduleName);
if ($moduleName[0] == $moduleName[1]) {
array_shift($moduleName);
}
}
$param = array_merge(array('module' => implode("\\", $moduleName), "action" => $name), $param);
$url->setParent($this->part);

View file

@ -46,7 +46,7 @@ class Settings
}
if (!is_array($settings)) {
throw new Exception($this->file);
throw new Exception('no data in ' . $this->file);
}
$this->data = $settings;