]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/controller/form/class_WebDoFormController.php
A lot rewrites and fixes for weak redirect methods
[shipsimu.git] / inc / classes / main / controller / form / class_WebDoFormController.php
index 1856dd3d1718f38babda4f23a2baf592c33d0433..8691c3d29da2bbf80bb7688278126adc81e14e57 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -30,12 +30,6 @@ class WebDoFormController extends BaseController implements Controller {
        protected function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
-
-               // Set part description
-               $this->setObjectDescription("Controller for handling forms");
-
-               // Create unique ID number
-               $this->generateUniqueId();
        }
 
        /**
@@ -51,7 +45,7 @@ class WebDoFormController extends BaseController implements Controller {
                // Set resolver instance
                $controllerInstance->setResolverInstance($resolverInstance);
 
-               // We need the controller instance in the resolver class so set it here
+               // We need the controller instance in resolver class so set it here
                $resolverInstance->setControllerInstance($controllerInstance);
 
                // Return the prepared instance
@@ -72,8 +66,8 @@ class WebDoFormController extends BaseController implements Controller {
                // Get command instance from resolver
                $commandInstance = $this->getResolverInstance()->resolveCommand($formAction);
 
-               // Try to add more filters by the command
-               $commandInstance->addExtraFilters($this);
+               // Add more filters by the command
+               $commandInstance->addExtraFilters($this, $requestInstance);
 
                // Try to run the pre filters, if auth exceptions come through redirect here
                try {
@@ -82,6 +76,9 @@ class WebDoFormController extends BaseController implements Controller {
                } catch (UserAuthorizationException $e) {
                        // Redirect to main page
                        $responseInstance->redirectToConfiguredUrl('login_failed_url');
+
+                       // Exit here
+                       exit();
                }
 
                // Is the request still valid? Post filters shall only be executed of