protected function _getRecentPublicThreads()
{
$nodeModel = $this->getModelFromCache('XenForo_Model_Node');
$nodes = $nodeModel->getAllNodes(false, true);
$nodePermissions = $nodeModel->getNodePermissionsForPermissionCombination(1);
$nodeHandlers = $nodeModel->getNodeHandlersForNodeTypes(
$nodeModel->getUniqueNodeTypeIdsFromNodeList($nodes)
);
$nodes = $nodeModel->getViewableNodesFromNodeList($nodes, $nodeHandlers, $nodePermissions);
$options = XenForo_Application::get('options');
foreach ($nodes as $node)
{
$nodeIds[] = $node['node_id'];
}
$conditions = array(
'node_id' => $nodeIds);
$fetchOptions = array(
'order' => 'post_date',
'limit' => $options->monthlyEmailsThreadLimit);
$threadModel = $this->getModelFromCache('XenForo_Model_Thread');
$threads = $threadModel->getThreads($conditions, $fetchOptions);
return $threads;
}