public function before_filter(&$action, &$args) { parent::before_filter($action, $args); # URL: /cliqr/qr/:id $cid = self::ensureMD5($action); $action = "show"; $args = array($cid); }
public function before_filter(&$action, &$args) { parent::before_filter($action, $args); # URL: /cliqr/poll/:range_id $range_id = self::ensureMD5($action); # check activation of this plugin in range_id if (!$this->plugin->isActivated($range_id)) { throw new Trails_Exception(404); } # transform params # $action -> show/update, $args -> [range_id] $action = Request::method() === 'POST' && !Request::submitted('login_ticket') ? 'update' : 'show'; $args = array($range_id); }
public function before_filter(&$action, &$args) { parent::before_filter($action, $args); $this->cid = self::requireContext(); self::requireAuthorisation($this->cid); // TODO: anders sicherstellen, dass sich #state und #start/stopdate nicht widersprechen Question::consolidateState($this->cid); # find and set question # URL: /cliqr/questions/(show|update|destroy|start|stop)/:question_id if (in_array($action, words("show update destroy start stop"))) { $question_id = self::ensureMD5($args[0]); $this->question = Question::find($question_id); } # else: index create }