private function templatePoll($pollid) { if (false === ($poll = GWF_VoteMulti::getByID($pollid))) { return $this->module->error('err_poll') . $this->templatePolls(); } return $poll->showResults(300); }
public function validate_pollid(Module_Forum $m, $arg) { if (false === ($p = GWF_VoteMulti::getByID($arg))) { return $m->lang('err_poll'); } if ($p->getUserID() !== $this->user->getID()) { return $m->lang('err_poll'); } return false; }
public function execute() { if (false === ($poll = GWF_VoteMulti::getByID(Common::getGet('vmid')))) { return $this->module->error('err_poll'); } $user = GWF_Session::getUser(); if (!$poll->mayEdit($user)) { return GWF_HTML::err('ERR_NO_PERMISSION'); } if (false !== Common::getPost('edit')) { return $this->onEdit($poll, $user) . $this->templateEdit($poll, $user); } return $this->templateEdit($poll, $user); }
public function execute() { if (false === ($poll = GWF_VoteMulti::getByID(Common::getPost('vmid')))) { return $this->module->error('err_poll'); } $user = GWF_Session::getUser(); if (false !== ($error = $this->checkReversible($poll, $user))) { return $error; } if (false === $poll->mayVote($user)) { return GWF_HTML::err('ERR_NO_PERMISSION'); } if (!$poll->isEnabled()) { return $this->module->error('err_poll_off'); } return $this->onVote($poll, $user); }
private function statsVoteMulti($vmid) { if (false === ($poll = GWF_VoteMulti::getByID($vmid))) { return $this->module->error('err_poll'); } }
public function getPoll() { return GWF_VoteMulti::getByID($this->getPollID()); }