function render() { $referers = new Referers(); $totalReferers = $referers->getBlogTotalReferers($this->_blogInfo->getId(), $this->_article->getId()); $postReferers = $referers->getArticleReferers($this->_article->getId(), $this->_blogInfo->getId(), $this->_page, DEFAULT_ITEMS_PER_PAGE); if (!$blogReferers) { $blogReferers = array(); } // calculate the links to the different pages $pager = new Pager("?op=postStats&postId=" . $this->_article->getId() . "&page=", $this->_page, $totalReferers, DEFAULT_ITEMS_PER_PAGE); $this->setValue("referrers", $postReferers); $this->setValue("pager", $pager); $this->setValue("post", $this->_article); parent::render(); }
function render() { $referers = new Referers(); $totalReferers = $referers->getBlogTotalReferers($this->_blogInfo->getId()); // get the current page $this->_page = $this->getCurrentPageFromRequest(); $blogReferers = $referers->getBlogReferers($this->_blogInfo->getId(), $this->_page, DEFAULT_ITEMS_PER_PAGE); if (!$blogReferers) { $blogReferers = array(); } // calculate the links to the different pages $pager = new Pager("?op=Stats&page=", $this->_page, $totalReferers, DEFAULT_ITEMS_PER_PAGE); $this->setValue("referrers", $blogReferers); $this->setValue("pager", $pager); parent::render(); }