Add id and updated elements to atom source

This commit is contained in:
Zach Copley 2010-03-12 00:36:26 +00:00
parent b12c344930
commit 7cdcb89dc9
2 changed files with 6 additions and 5 deletions

View File

@ -1128,6 +1128,7 @@ class Notice extends Memcached_DataObject
if ($source) { if ($source) {
$xs->elementStart('source'); $xs->elementStart('source');
$xs->element('id', null, $profile->profileurl);
$xs->element('title', null, $profile->nickname . " - " . common_config('site', 'name')); $xs->element('title', null, $profile->nickname . " - " . common_config('site', 'name'));
$xs->element('link', array('href' => $profile->profileurl)); $xs->element('link', array('href' => $profile->profileurl));
$user = User::staticGet('id', $profile->id); $user = User::staticGet('id', $profile->id);
@ -1143,6 +1144,7 @@ class Notice extends Memcached_DataObject
} }
$xs->element('icon', null, $profile->avatarUrl(AVATAR_PROFILE_SIZE)); $xs->element('icon', null, $profile->avatarUrl(AVATAR_PROFILE_SIZE));
$xs->element('updated', null, common_date_w3dtf($this->created));
} }
if ($source) { if ($source) {

View File

@ -371,11 +371,10 @@ class User_group extends Memcached_DataObject
if ($source) { if ($source) {
$xs->elementStart('source'); $xs->elementStart('source');
$xs->element('id', null, $this->permalink());
$xs->element('title', null, $profile->nickname . " - " . common_config('site', 'name')); $xs->element('title', null, $profile->nickname . " - " . common_config('site', 'name'));
$xs->element('link', array('href' => $this->permalink())); $xs->element('link', array('href' => $this->permalink()));
} $xs->element('updated', null, $this->modified);
if ($source) {
$xs->elementEnd('source'); $xs->elementEnd('source');
} }