Esempio n. 1
0
 public function action_showArticle()
 {
     $articleId = $this->request->param('article_id');
     $this->view["id"] = $articleId;
     $article = Model_Article::get($articleId);
     if ($article->id == 0) {
         throw new HTTP_Exception_404();
     }
     $this->stats->hit(Model_Stats::ARTICLE, $articleId);
     $this->view["article"] = $article;
     $this->title = $article->title;
     $comments = Model_Comment::getCommentsByArticle($articleId);
     $comments_table_rebuild = $this->methods->rebuildCommentsTree($comments);
     $this->view["comments"] = $comments_table_rebuild;
     $this->template->content = View::factory('templates/articles/article', $this->view);
 }