Add categories to the Atom content.

Signed-off-by: Andrew McMillan <andrew@morphoss.com>
This commit is contained in:
Andrew McMillan 2010-12-27 13:03:26 +13:00
parent 18e58fa796
commit 520077a9a5

View File

@ -155,9 +155,13 @@ function caldav_get_feed( $request ) {
.'<strong>' . translate('URL') . '</strong>: ' . hyperlink($p_url->Value());
$p_cat = $event_data[0]->GetProperty('CATEGORIES');
if ( $p_cat != null )
$content .= '<br />'
.'<strong>' . translate('Categories') . '</strong>: ' . $p_cat->Value();
if ( $p_cat != null ) {
$content .= '<br />' .'<strong>' . translate('Categories') . '</strong>: ' . $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() != '' ) {