From 520077a9a51794a8011ed5d12e971bbcc3531499 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Mon, 27 Dec 2010 13:03:26 +1300 Subject: [PATCH] Add categories to the Atom content. Signed-off-by: Andrew McMillan --- htdocs/feed.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/feed.php b/htdocs/feed.php index 28a40b16..780900d0 100644 --- a/htdocs/feed.php +++ b/htdocs/feed.php @@ -155,9 +155,13 @@ function caldav_get_feed( $request ) { .'' . translate('URL') . ': ' . hyperlink($p_url->Value()); $p_cat = $event_data[0]->GetProperty('CATEGORIES'); - if ( $p_cat != null ) - $content .= '
' - .'' . translate('Categories') . ': ' . $p_cat->Value(); + if ( $p_cat != null ) { + $content .= '
' .'' . translate('Categories') . ': ' . $p_cat->Value(); + $categories = explode(',',$p_cat->Value()); + foreach( $categories AS $category ) { + $item->addCategory( array('term' => trim($category)) ); + } + } $p_description = $event_data[0]->GetProperty('DESCRIPTION'); if ( $p_description != null && $p_description->Value() != '' ) {