private function onGuestVote() { if (!$this->votescore->isGuestVote()) { return $this->module->error('err_no_guest'); } $ip = GWF_IP6::getIP(GWF_IP_QUICK); if (false === ($vsr = GWF_VoteScoreRow::getByIP($this->votescore->getID(), $ip))) { if (false === $this->votescore->onGuestVote($this->score, $ip)) { return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)); } return $this->onVoted(false); } else { if ($vsr->isUserVote()) { return $this->module->message('err_vote_ip'); } if (!$vsr->isGuestVoteExpired($this->module->cfgGuestTimeout())) { $this->votescore->revertVote($vsr, $ip, 0); } if (false === $this->votescore->onGuestVote($this->score, $ip)) { return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__)); } return $this->onVoted(false); } }