[*] Classes : #PSTEST-951 - controller filename in module can now use any case and use or not "Controller" suffix
This commit is contained in:
1 parent
d8a390a16f
commit
c93f92720e
1 file changed
+3
-2
@@ -289,8 +289,9 @@ class DispatcherCore
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
include_once(_PS_MODULE_DIR_.$tab->module.'/controllers/admin/'.$this->controller.'.php');
|
// Controllers in modules can be named AdminXXX.php or AdminXXXController.php
|
||||||
$controller_class = $controllers[$this->controller].'Controller';
|
include_once(_PS_MODULE_DIR_.$tab->module.'/controllers/admin/'.$controllers[$this->controller].'.php');
|
||||||
|
$controller_class = $controllers[$this->controller].(strpos($controllers[$this->controller], 'Controller') ? '' : 'Controller');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user