public function renderArticle($url) { if (!\App\Helper\Helper::isIndexBot()) { $this->articleManager->viewForArticleUrl($url, $this->getSession()); } $this->template->serial = $this->articleDat->ref('underSerial'); if ($this->template->serial) { $this->template->articleInSerial = $this->articleManager->getArticlesUnderSerial($this->template->serial->articleOrder); } $this->template->article = $this->articleDat; }
public function handleRate($points) { if (!$points || !is_numeric($points) || $points > $this->points || $points < $this->from) { throw new Nette\Application\BadRequestException(); } if (\App\Helper\Helper::isIndexBot()) { return; } if ($this->ratingManager->addVote($points)) { $this->redrawAjax('Hodnocení přidáno'); } }