Added support to RSS 2.0 categories. Credits go to Dmitry Pupinin.

Bug 3654
(http://moodle.org/bugs/bug.php?op=show&bugid=3654)
This commit is contained in:
stronk7
2005-07-24 23:02:36 +00:00
parent 81013d9eff
commit e55407bfd4
+4
View File
@@ -204,6 +204,10 @@ function rss_add_items($items) {
if (!empty($items)) {
foreach ($items as $item) {
$result .= rss_start_tag('item',2,true);
//Include the category if exists (some rss readers will use it to group items)
if (isset($item->category)) {
$result .= rss_full_tag('category',3,false,$item->category);
}
$result .= rss_full_tag('title',3,false,$item->title);
$result .= rss_full_tag('link',3,false,$item->link);
$result .= rss_full_tag('pubDate',3,false,date('r',$item->pubdate));