X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Frssaction.php;h=7d79ac043dd4867588c37cc72b3f9a6a3fd7af76;hb=171b4f72ee5a84d2a67b99aca7df9406e68f60c1;hp=9d4066ee59fffd6325234c5d5283f93ea1124050;hpb=310ef22fd996a21642cc63b33829cc1f397269d7;p=quix0rs-gnu-social.git diff --git a/lib/rssaction.php b/lib/rssaction.php index 9d4066ee59..7d79ac043d 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -68,6 +68,7 @@ class Rss10Action extends Action { } function show_channel($notices) { + global $config; $channel = $this->get_channel(); $image = $this->get_image(); @@ -76,6 +77,7 @@ class Rss10Action extends Action { common_element('title', NULL, $channel['title']); common_element('link', NULL, $channel['link']); common_element('description', NULL, $channel['description']); + common_element('cc:licence', array('rdf:resource' => $config['license']['url'])); if ($image) { common_element('image', array('rdf:resource' => $image)); @@ -83,14 +85,14 @@ class Rss10Action extends Action { common_element_start('items'); common_element_start('rdf:Seq'); - foreach ($notices as $n) { - common_element('rdf:li', array('rdf:resource' => - common_local_url('shownotice', - array('notice' => $n->id)))); + + foreach ($notices as $notice) { + common_element('rdf:li', array('rdf:resource' => $notice->uri)); } common_element_end('rdf:Seq'); common_element_end('items'); + common_element_end('channel'); } @@ -107,12 +109,16 @@ class Rss10Action extends Action { } function show_item($notice) { + global $config; + $profile = Profile::staticGet($notice->profile_id); $nurl = common_local_url('shownotice', array('notice' => $notice->id)); - common_element_start('item', array('rdf:about' => $nurl)); - common_element('title', NULL, $notice->created); + common_element_start('item', array('rdf:about' => $notice->uri)); + common_element('title', NULL, $profile->nickname."'s status on ".common_date_string($notice->created)); common_element('link', NULL, $nurl); - common_element('description', NULL, common_render_content($notice->content)); + common_element('description', NULL, $notice->content); common_element('dc:date', NULL, common_date_w3dtf($notice->created)); + common_element('dc:creator', NULL, ($profile->fullname) ? $profile->fullname : $profile->nickname); + common_element('cc:licence', array('rdf:resource' => $config['license']['url'])); common_element_end('item'); } @@ -124,6 +130,8 @@ class Rss10Action extends Action { 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/', + 'xmlns:cc' => + 'http://web.resource.org/cc/', 'xmlns' => 'http://purl.org/rss/1.0/')); }