Example #1
0
 protected function runUntrustedAction($action)
 {
     switch ($action) {
         case 'update':
             return !is_null($id = $this->fromGetOrPost()) && $this->actionUpdate($id);
     }
     return parent::runTrustedAction($action);
 }
Example #2
0
 protected function runTrustedAction($action)
 {
     switch ($action) {
         case 'flag':
             return !is_null($id = $this->fromGetOrPost()) && $this->isNotOwner($id) && $this->actionFlag($id);
         case 'refresh':
             return !is_null($id = $this->fromGetOrPost()) && $this->isOwner($id) && $this->actionRefresh($id);
     }
     return parent::runTrustedAction($action);
 }