function get_feeds_list()
 {
     global $LANG;
     $feed = array();
     require_once PATH_TO_ROOT . '/forum/forum.class.php';
     $forum = new Forum();
     $categories = $forum->get_cats_tree();
     import('content/syndication/feeds_list');
     import('content/syndication/feeds_cat');
     $cat_tree = new FeedsCat('forum', 0, $LANG['root']);
     ForumInterface::_feeds_add_category($cat_tree, $categories);
     $children = $cat_tree->get_children();
     $feeds = new FeedsList();
     if (count($children) > 0) {
         $feeds->add_feed($children[0], DEFAULT_FEED_NAME);
     }
     return $feeds;
 }
Exemplo n.º 2
0
 public function add(ForumInterface $forum)
 {
     $this->forums[$forum->getName()] = $forum;
 }