Beispiel #1
0
 private function sanitize()
 {
     if (false === ($this->votescore = GWF_VoteScore::getByID(Common::getGet('vsid')))) {
         return $this->module->error('err_votescore');
     }
     if ($this->votescore->isIrreversible() && $this->votescore->hasVoted(GWF_Session::getUser())) {
         return $this->module->error('err_irreversible');
     }
     if (false === ($this->score = Common::getGet('score'))) {
         return $this->module->error('err_score');
     }
     if (!$this->votescore->isInRange($this->score)) {
         return $this->module->error('err_score');
     }
     if ($this->votescore->isExpired()) {
         return $this->module->error('err_expired');
     }
     if ($this->votescore->isDisabled()) {
         return $this->module->error('err_disabled');
     }
     return false;
 }