From: Roland Häder Date: Thu, 20 Nov 2008 19:58:42 +0000 (+0000) Subject: No controller instances are now passed to filters X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=26447c8c004c0420e4fd97fe3f232f65427486fb;p=core.git No controller instances are now passed to filters --- diff --git a/inc/classes/main/actions/web/class_WebLoginProfileAction.php b/inc/classes/main/actions/web/class_WebLoginProfileAction.php index 09998865..a7de7e8c 100644 --- a/inc/classes/main/actions/web/class_WebLoginProfileAction.php +++ b/inc/classes/main/actions/web/class_WebLoginProfileAction.php @@ -69,7 +69,7 @@ class WebLoginProfileAction extends BaseAction implements Commandable, Registera */ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { // Add user status filter here - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter', array($controllerInstance))); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter')); } } diff --git a/inc/classes/main/commands/web/class_WebResendLinkCommand.php b/inc/classes/main/commands/web/class_WebResendLinkCommand.php index c66a39b5..596bf894 100644 --- a/inc/classes/main/commands/web/class_WebResendLinkCommand.php +++ b/inc/classes/main/commands/web/class_WebResendLinkCommand.php @@ -134,7 +134,7 @@ class WebResendLinkCommand extends BaseCommand implements Commandable { */ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { // Filter for checking if account is unconfirmed - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_unconfirmed_filter', array($controllerInstance))); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_unconfirmed_filter')); } } diff --git a/inc/classes/main/controller/captcha/class_ImageCodeCaptchaController.php b/inc/classes/main/controller/captcha/class_ImageCodeCaptchaController.php index 64e1a1a5..a6717456 100644 --- a/inc/classes/main/controller/captcha/class_ImageCodeCaptchaController.php +++ b/inc/classes/main/controller/captcha/class_ImageCodeCaptchaController.php @@ -46,7 +46,7 @@ class ImageCodeCaptchaController extends BaseController implements Controller { $controllerInstance->setResolverInstance($resolverInstance); // Add filter for checking the "encrypt" string - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_encrypt_validator_filter', array($controllerInstance))); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_encrypt_validator_filter')); // Return the prepared instance return $controllerInstance; diff --git a/inc/classes/main/controller/login/class_WebLoginAreaController.php b/inc/classes/main/controller/login/class_WebLoginAreaController.php index 0ad97f05..75690eb3 100644 --- a/inc/classes/main/controller/login/class_WebLoginAreaController.php +++ b/inc/classes/main/controller/login/class_WebLoginAreaController.php @@ -47,16 +47,16 @@ class WebLoginAreaController extends BaseController implements Controller { $controllerInstance->setResolverInstance($resolverInstance); // User auth filter - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter', array($controllerInstance))); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter')); // User update filter - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_update_filter', array($controllerInstance))); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_update_filter')); // News fetcher filter - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter', array($controllerInstance))); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter')); // News proccess/display-preparation - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter', array($controllerInstance))); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter')); // Return the prepared instance return $controllerInstance; diff --git a/inc/classes/main/controller/web/class_WebConfirmController.php b/inc/classes/main/controller/web/class_WebConfirmController.php index ebdd1508..411c59ba 100644 --- a/inc/classes/main/controller/web/class_WebConfirmController.php +++ b/inc/classes/main/controller/web/class_WebConfirmController.php @@ -47,10 +47,10 @@ class WebConfirmController extends BaseController implements Controller { $controllerInstance->setResolverInstance($resolverInstance); // Add filters for handling confirmation code and username - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_verifier_filter', array($controllerInstance))); - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_unconfirmed_filter', array($controllerInstance))); - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('confirm_code_verifier_filter', array($controllerInstance))); - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_confirmed_filter', array($controllerInstance))); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_verifier_filter')); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_unconfirmed_filter')); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('confirm_code_verifier_filter')); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_confirmed_filter')); // Return the prepared instance return $controllerInstance; diff --git a/inc/classes/main/controller/web/class_WebDefaultNewsController.php b/inc/classes/main/controller/web/class_WebDefaultNewsController.php index 8d7255d0..d5769e9a 100644 --- a/inc/classes/main/controller/web/class_WebDefaultNewsController.php +++ b/inc/classes/main/controller/web/class_WebDefaultNewsController.php @@ -46,8 +46,8 @@ class WebDefaultNewsController extends BaseController implements Controller { $controllerInstance->setResolverInstance($resolverInstance); // Add news filters to this controller - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter', array($controllerInstance))); - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter', array($controllerInstance))); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter')); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter')); // Return the prepared instance return $controllerInstance; diff --git a/inc/classes/main/controller/web/class_WebLogoutController.php b/inc/classes/main/controller/web/class_WebLogoutController.php index 258d1995..7d8a9aee 100644 --- a/inc/classes/main/controller/web/class_WebLogoutController.php +++ b/inc/classes/main/controller/web/class_WebLogoutController.php @@ -47,10 +47,10 @@ class WebLogoutController extends BaseController implements Controller { $controllerInstance->setResolverInstance($resolverInstance); // Add user auth filter (we don't need an update of the user here because it will be redirected) - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter', array($controllerInstance))); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter')); // User status filter - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter', array($controllerInstance))); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter')); // Return the prepared instance return $controllerInstance;