public function board()
 {
     $ns = $this->wg->Title->getNamespace();
     if ($ns == NS_WIKIA_FORUM_TOPIC_BOARD) {
         $topicTitle = $this->getTopicTitle();
         if (empty($topicTitle) || !$topicTitle->exists()) {
             if (!$topicTitle->exists()) {
                 $this->redirectToIndex();
                 return false;
             }
         }
     }
     parent::index(self::BOARD_PER_PAGE);
     JSMessages::enqueuePackage('Wall', JSMessages::EXTERNAL);
     $this->response->addAsset('forum_js');
     $this->response->addAsset('extensions/wikia/Forum/css/ForumBoard.scss');
     $this->response->addAsset('extensions/wikia/Wall/css/MessageTopic.scss');
     // VOLDEV-36: separate monobook styling
     if ($this->app->checkSkin('monobook')) {
         $this->response->addAsset('extensions/wikia/Forum/css/monobook/ForumMonobook.scss');
         $this->response->addAsset('extensions/wikia/Forum/css/monobook/ForumBoardMonobook.scss');
     }
     $this->addMiniEditorAssets();
     $this->description = '';
     if ($ns == NS_WIKIA_FORUM_TOPIC_BOARD) {
         $board = ForumBoard::getEmpty();
         $this->response->setVal('activeThreads', $board->getTotalActiveThreads($this->wall->getRelatedPageId()));
         $this->response->setVal('isTopicPage', true);
         $this->app->wg->Out->setPageTitle(wfMessage('forum-board-topic-title', $this->wg->title->getBaseText())->plain());
     } else {
         $boardId = $this->wall->getId();
         $board = ForumBoard::newFromId($boardId);
         if (empty($board)) {
             $this->redirectToIndex();
             return false;
         }
         $this->response->setVal('activeThreads', $board->getTotalActiveThreads());
         $this->response->setVal('isTopicPage', false);
         $this->description = $board->getDescription();
         $this->app->wg->Out->setPageTitle(wfMessage('forum-board-title', $this->wg->title->getBaseText())->plain());
     }
     $this->response->setVal('boardNamespace', NS_WIKIA_FORUM_BOARD);
     //TODO: keep the varnish cache and do purging on post
     $this->response->setCacheValidity(WikiaResponse::CACHE_DISABLED);
     $this->app->wg->SuppressPageHeader = true;
 }
 public function board()
 {
     parent::index();
     F::build('JSMessages')->enqueuePackage('Wall', JSMessages::EXTERNAL);
     $this->response->addAsset('forum_js');
     $this->response->addAsset('extensions/wikia/Forum/css/ForumBoard.scss');
     $this->response->addAsset('extensions/wikia/Forum/css/MessageTopic.scss');
     $this->addMiniEditorAssets();
     if ($this->wall->getTitle()->getNamespace() == NS_WIKIA_FORUM_TOPIC_BOARD) {
         $board = F::build('ForumBoard', array(0), 'newFromId');
         $this->response->setVal('activeThreads', $board->getTotalActiveThreads($this->wall->getRelatedPageId()));
         $this->response->setVal('isTopicPage', true);
     } else {
         $boardId = $this->wall->getId();
         $board = F::build('ForumBoard', array($boardId), 'newFromId');
         $this->response->setVal('activeThreads', $board->getTotalActiveThreads());
         $this->response->setVal('isTopicPage', false);
     }
     $this->app->wg->SuppressPageHeader = true;
     $this->app->wg->Out->setPageTitle(wfMsg('forum-board-title', $this->wg->title->getBaseText()));
 }