/** * Gets the latest posts from all public forums. * * @author Martin Helmich <*****@*****.**> * @return array An array containing all matching posts */ function getPosts_all() { $res = $this->databaseHandle->exec_SELECTquery($this->selectFields, 'tx_mmforum_posts p LEFT JOIN tx_mmforum_posts_text x ON x.post_id = p.uid LEFT JOIN fe_users u ON u.uid = p.poster_id LEFT JOIN tx_mmforum_topics t ON t.uid = p.topic_id LEFT JOIN tx_mmforum_forums f ON t.forum_id = f.uid LEFT JOIN tx_mmforum_forums c ON f.parentID = c.uid', 'p.deleted=0 AND t.deleted=0 AND f.deleted=0 ' . $this->pObj->getMayRead_forum_query('f') . $this->pObj->getMayRead_forum_query('c'), '', 'p.post_time DESC', $this->getPostNum()); $results = array(); while ($arr = $this->databaseHandle->sql_fetch_assoc($res)) { array_push($results, $arr); } return $results; }