public function actionIndex()
{
$conversationId = $this->_input->filterSingle('conversation_id', XenForo_Input::UINT);
if ($conversationId)
{
return $this->responseReroute(__CLASS__, 'view');
}
$visitor = XenForo_Visitor::getInstance();
$conversationModel = $this->_getConversationModel();
$conditions = $this->_getListConditions();
$fetchOptions = $this->_getListFetchOptions();
$totalConversations = $conversationModel->countConversationsForUser($visitor['user_id'], $conditions);
$conversations = $conversationModel->getConversationsForUser($visitor['user_id'], $conditions, $fetchOptions);
$conversations = $conversationModel->prepareConversations($conversations);
$viewParams = array(
'conversations' => $conversations,
'page' => $fetchOptions['page'],
'conversationsPerPage' => $fetchOptions['perPage'],
'totalConversations' => $totalConversations,
'ignoredNames' => $this->_getIgnoredContentUserNames($conversations),
'canStartConversation' => $conversationModel->canStartConversations(),
'search_type' => $conditions['search_type'],
'search_user' => $conditions['search_user'],
'pageNavParams' => array(
'search_type' => ($conditions['search_type'] ? $conditions['search_type'] : false),
'search_user' => ($conditions['search_user'] ? $conditions['search_user'] : false),
),
);
// return $this->responseView('XenForo_ViewPublic_Conversation_List', 'conversation_list', $viewParams);
return $this->_getWrapper(
'conversations', 'view',
$this->responseView('XenForo_ViewPublic_Conversation_List', 'conversation_list', $viewParams)
);
}