X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fcontroller%2Fhtml%2Fform%2Fclass_HtmlDoFormController.php;h=2dc6b884f31b48b1429e8167886750f2a1e98494;hp=38ae3c2a7b9405624e01ac12db54c640359f2fa3;hb=b75d59b0b03c28c0c142df99bf70692f9d2b9086;hpb=8609a988b78b7e039dbf74b95a05b2fcd6687a70 diff --git a/inc/classes/main/controller/html/form/class_HtmlDoFormController.php b/inc/classes/main/controller/html/form/class_HtmlDoFormController.php index 38ae3c2a..2dc6b884 100644 --- a/inc/classes/main/controller/html/form/class_HtmlDoFormController.php +++ b/inc/classes/main/controller/html/form/class_HtmlDoFormController.php @@ -60,39 +60,8 @@ class HtmlDoFormController extends BaseController implements Controller { * @return void */ public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) { - // Get the "form action" - $formAction = $requestInstance->getRequestElement('form'); - - // Get command instance from resolver - $commandInstance = $this->getResolverInstance()->resolveCommand($formAction); - - // Add more filters by the command - $commandInstance->addExtraFilters($this, $requestInstance); - - // Try to run the pre filters, if auth exceptions come through redirect here - try { - // Run the pre filters - $this->executePreFilters($requestInstance, $responseInstance); - } catch (UserAuthorizationException $e) { - // Redirect to main page - $responseInstance->redirectToConfiguredUrl('login_failed'); - - // Exit here - exit(); - } - - // Is the request still valid? Post filters shall only be executed of - // the request is valid - if ($requestInstance->isRequestValid()) { - // Execute the command - $commandInstance->execute($requestInstance, $responseInstance); - - // Execute *very* generic ppost filters - $this->executePostFilters($requestInstance, $responseInstance); - } - - // Flush the buffer out - $responseInstance->flushBuffer(); + // Generic handling with redirect to 'login_failed' + $this->genericHanleRequestLoginFailedRedirect($requestInstance, $responseInstance); } }