<?php
class LilTee_NodesInSidebar_ControllerPublic_Forum extends XFCP_LilTee_NodesInSidebar_ControllerPublic_Forum
{
public function actionIndex()
{
$forumId = $this->_input->filterSingle('node_id', XenForo_Input::UINT);
$forumName = $this->_input->filterSingle('node_name', XenForo_Input::STRING);
if ($forumId || $forumName)
{
return $this->responseReroute(__CLASS__, 'forum');
}
if ($this->_routeMatch->getResponseType() == 'rss')
{
return $this->getGlobalForumRss();
}
$this->canonicalizeRequestUrl(
XenForo_Link::buildPublicLink('forums')
);
//Get nodes
$nodeModel = $this->getModelFromCache('XenForo_Model_Node');
$nodes = $nodeModel->getViewableNodeList(null, true);
$nodeTypes = $nodeModel->getAllNodeTypes();
$nodes = $nodeModel->filterOrphanNodes($nodes);
$selected = preg_replace('/[^a-z0-9_-]/i', '', $this->_input->filterSingle('selected', XenForo_Input::STRING));
//
$viewParams = array(
'nodeList' => $this->_getNodeModel()->getNodeDataForListDisplay(false, 0),
'onlineUsers' => $this->_getSessionActivityList(),
'boardTotals' => $this->_getBoardTotals(),
'nodeTypes' => $nodeTypes,
'selected' => $selected,
'nodes' => $nodes
);
return $this->responseView('XenForo_ViewPublic_Forum_List', 'forum_list', $viewParams);
}
}