gyro/core/controller/base/renderdecorators/commandsrouterenderdecorator.cls.php
Go to the documentation of this file.00001 <?php 00002 require_once dirname(__FILE__) . '/renderdecoratorbase.cls.php'; 00003 00004 /** 00005 * A render decorator that checks for validation tokens 00006 * 00007 * Used with Commands Processing Routes 00008 * 00009 * @author Gerd Riesselmann 00010 * @ingroup Controller 00011 */ 00012 class CommandsRouteRenderDecorator extends RenderDecoratorBase { 00013 /** 00014 * Initialize this decorator and the data passed 00015 * 00016 * @param PageData $page_data 00017 * @return void 00018 */ 00019 public function initialize($page_data) { 00020 Load::tools('formhandler'); 00021 $formhandler = new FormHandler('process_commands'); 00022 $err = $formhandler->validate($_GET); 00023 if ($err->is_error()) { 00024 History::go_to(0, $err); 00025 exit; 00026 } 00027 00028 parent::initialize($page_data); 00029 } 00030 }