X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fship-simu%2Fmain%2Ffilter%2Fgoverment%2Fclass_ShipSimuGovermentPaysTrainingFilter.php;h=81464998b636eb293d3080265a5e9d8907e3ec8f;hb=30df0901e305b20d05c8209ded93c688f77ccac7;hp=febd4bd2c8594c458b69f7892ff88043191ced31;hpb=bbf48d46cb9063a4d2b78c106747147712f5474e;p=shipsimu.git diff --git a/application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysTrainingFilter.php b/application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysTrainingFilter.php index febd4bd..8146499 100644 --- a/application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysTrainingFilter.php +++ b/application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysTrainingFilter.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class ShipSimuGovermentPaysTrainingFilter extends BaseFrameworkSystem implements Filterable { +class ShipSimuGovermentPaysTrainingFilter extends BaseShipSimuFilter implements Filterable { /** * Protected constructor * @@ -30,16 +30,12 @@ class ShipSimuGovermentPaysTrainingFilter extends BaseFrameworkSystem implements protected function __construct () { // Call parent constructor parent::__construct(__CLASS__); - - // Clean up a little - $this->removeNumberFormaters(); - $this->removeSystemArray(); } /** * Creates an instance of this filter class * - * @return $filterInstance An instance of this filter class + * @return $filterInstance An instance of this filter class */ public final static function createShipSimuGovermentPaysTrainingFilter () { // Get a new instance @@ -58,6 +54,9 @@ class ShipSimuGovermentPaysTrainingFilter extends BaseFrameworkSystem implements * @todo 0% done */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // Execute the parent execute method + parent::execute($requestInstance, $responseInstance); + // Get the user instance from registry $userInstance = Registry::getRegistry()->getInstance('user'); @@ -66,11 +65,11 @@ class ShipSimuGovermentPaysTrainingFilter extends BaseFrameworkSystem implements // Request is invalid $requestInstance->requestIsValid(false); - // Add a message to the response - $responseInstance->addFatalMessage('goverment_pays_no_training'); + // Redirect to configured URL + $responseInstance->redirectToConfiguredUrl('login_goverment_training_failed_url'); - // Abort here - return false; + // Stop processing here + exit(); } // END - if } }