/**
* List of all new watched content.
*
* @return XenForo_ControllerResponse_Abstract
*/
public function actionForums()
{
/** @var $nodeModel XenForo_Model_Node */
$nodeModel = $this->getModelFromCache('XenForo_Model_Node');
$forumWatchModel = $this->_getForumWatchModel();
$visitor = XenForo_Visitor::getInstance();
$forumsWatched = $forumWatchModel->getUserForumWatchByUser($visitor['user_id']);
$nodes = $nodeModel->getAllNodes(false, false);
foreach ($nodes AS $nodeId => $node)
{
if ($node['display_in_list'])
{
continue;
}
// if (!isset($forumsWatched[$nodeId]))
// {
// unset($nodes[$nodeId]);
// }
}
$viewParams = array(
'nodeList' => $nodeModel->getNodeListDisplayData($nodes, 0, 0),
'forumsWatched' => $forumsWatched
);
return $this->responseView('XenForo_ViewPublic_Watched_Forums', 'watch_forums', $viewParams);
}