HTML output in RSS 2.0 and Atom
darcs-hash:20081205160205-84dde-68363153ee7f4f75a7c25ca6546816b648406b8b.gz
This commit is contained in:
parent
e5ef205a5b
commit
a61c7546c8
|
@ -92,8 +92,8 @@ class TwitterapiAction extends Action {
|
||||||
$server = common_config('site', 'server');
|
$server = common_config('site', 'server');
|
||||||
$entry = array();
|
$entry = array();
|
||||||
|
|
||||||
$entry['content'] = $profile->nickname . ': ' . common_xml_safe_str($notice->content);
|
$entry['content'] = common_xml_safe_str($notice->rendered);
|
||||||
$entry['title'] = $entry['content'];
|
$entry['title'] = $profile->nickname . ': ' . common_xml_safe_str($notice->content);
|
||||||
$entry['link'] = common_local_url('shownotice', array('notice' => $notice->id));
|
$entry['link'] = common_local_url('shownotice', array('notice' => $notice->id));
|
||||||
$entry['published'] = common_date_iso8601($notice->created);
|
$entry['published'] = common_date_iso8601($notice->created);
|
||||||
$entry['id'] = "tag:$server,2008:$entry[link]";
|
$entry['id'] = "tag:$server,2008:$entry[link]";
|
||||||
|
@ -116,7 +116,7 @@ class TwitterapiAction extends Action {
|
||||||
$message->getFrom()->nickname, $message->getTo()->nickname);
|
$message->getFrom()->nickname, $message->getTo()->nickname);
|
||||||
|
|
||||||
$entry['content'] = common_xml_safe_str($message->content);
|
$entry['content'] = common_xml_safe_str($message->content);
|
||||||
$entry['link'] = $message->uri;
|
$entry['link'] = common_local_url('showmessage', array('message' => $message->id));
|
||||||
$entry['published'] = common_date_iso8601($message->created);
|
$entry['published'] = common_date_iso8601($message->created);
|
||||||
$entry['id'] = "tag:$server,2008:$entry[link]";
|
$entry['id'] = "tag:$server,2008:$entry[link]";
|
||||||
$entry['updated'] = $entry['published'];
|
$entry['updated'] = $entry['published'];
|
||||||
|
@ -191,7 +191,7 @@ class TwitterapiAction extends Action {
|
||||||
function show_twitter_atom_entry($entry) {
|
function show_twitter_atom_entry($entry) {
|
||||||
common_element_start('entry');
|
common_element_start('entry');
|
||||||
common_element('title', NULL, $entry['title']);
|
common_element('title', NULL, $entry['title']);
|
||||||
common_element('content', array('type' => 'html'), $entry['title']);
|
common_element('content', array('type' => 'html'), $entry['content']);
|
||||||
common_element('id', NULL, $entry['id']);
|
common_element('id', NULL, $entry['id']);
|
||||||
common_element('published', NULL, $entry['published']);
|
common_element('published', NULL, $entry['published']);
|
||||||
common_element('updated', NULL, $entry['updated']);
|
common_element('updated', NULL, $entry['updated']);
|
||||||
|
@ -288,7 +288,6 @@ class TwitterapiAction extends Action {
|
||||||
common_element('language', NULL, 'en-us');
|
common_element('language', NULL, 'en-us');
|
||||||
common_element('ttl', NULL, '40');
|
common_element('ttl', NULL, '40');
|
||||||
|
|
||||||
|
|
||||||
if (is_array($notice)) {
|
if (is_array($notice)) {
|
||||||
foreach ($notice as $n) {
|
foreach ($notice as $n) {
|
||||||
$entry = $this->twitter_rss_entry_array($n);
|
$entry = $this->twitter_rss_entry_array($n);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user