/** * Current active poll. * */ public function currentAction() { $question = Poll_Question::getCurrent(); if (!isset($this->_session->poll[$question->getId()])) { $question->incrementViewsCount(); } $this->_session->poll[$question->getId()] = true; $this->view->voted = isset($_COOKIE['poll_' . $question->getId()]) ? 1 : 0; $this->view->question = $question; }