| 5 aggregator.module | aggregator_page_opml($cid = NULL) |
| 6 aggregator.pages.inc | aggregator_page_opml($cid = NULL) |
| 7 aggregator.pages.inc | aggregator_page_opml($cid = NULL) |
| 8 aggregator.pages.inc | aggregator_page_opml($cid = NULL) |
Menu callback; generates an OPML representation of all feeds.
Parameters
$cid: If set, feeds are exported only from a category with this ID. Otherwise, all feeds are exported.
Return value
The output XML.
2 string references to 'aggregator_page_opml'
File
- modules/
aggregator/ aggregator.pages.inc, line 458 - User page callbacks for the aggregator module.
Code
function aggregator_page_opml($cid = NULL) {
if ($cid) {
$result = db_query('SELECT f.title, f.url FROM {aggregator_feed} f LEFT JOIN {aggregator_category_feed} c on f.fid = c.fid WHERE c.cid = :cid ORDER BY title', array(':cid' => $cid));
}
else {
$result = db_query('SELECT * FROM {aggregator_feed} ORDER BY title');
}
$feeds = $result->fetchAll();
return theme('aggregator_page_opml', array('feeds' => $feeds));
}
Login or register to post comments