mirror of
https://github.com/Karaka-Management/oms-Script.git
synced 2026-01-11 20:38:42 +00:00
fix tests
This commit is contained in:
parent
cdee17f132
commit
7735838130
|
|
@ -19,15 +19,6 @@ use phpOMS\Router\RouteVerb;
|
|||
|
||||
return [
|
||||
'^.*/helper/template/create.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Media\Controller\BackendController::setUpFileUploaderTrait',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionCategory::TEMPLATE,
|
||||
],
|
||||
],
|
||||
[
|
||||
'dest' => '\Modules\Helper\Controller\BackendController:viewTemplateCreate',
|
||||
'verb' => RouteVerb::GET,
|
||||
|
|
@ -39,15 +30,6 @@ return [
|
|||
],
|
||||
],
|
||||
'^.*/helper/report/create.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Media\Controller\BackendController::setUpFileUploaderTrait',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionCategory::REPORT,
|
||||
],
|
||||
],
|
||||
[
|
||||
'dest' => '\Modules\Helper\Controller\BackendController:viewReportCreate',
|
||||
'verb' => RouteVerb::GET,
|
||||
|
|
|
|||
|
|
@ -83,9 +83,12 @@ final class Autoloader
|
|||
}
|
||||
|
||||
$class2 = $class;
|
||||
$class3 = $class;
|
||||
|
||||
$pos = \stripos($class, '/');
|
||||
if ($pos !== false) {
|
||||
$class3 = \substr($class, $pos + 1);
|
||||
|
||||
$pos = \stripos($class, '/', $pos + 1);
|
||||
|
||||
if ($pos !== false) {
|
||||
|
|
@ -94,7 +97,7 @@ final class Autoloader
|
|||
}
|
||||
|
||||
foreach (self::$paths as $path) {
|
||||
if (\is_file($file = $path . $class2 . '.php')) {
|
||||
if (\is_file($file = $path . $class2 . '.php') && \stripos($file, $class3) !== false) {
|
||||
include_once $file;
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user