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

@ -295,7 +295,7 @@ class User_group extends Memcached_DataObject
} }
// If not, check local groups. // If not, check local groups.
$group = Local_group::staticGet('nickname', $nickname); $group = Local_group::staticGet('nickname', $nickname);
if (!empty($group)) { if (!empty($group)) {
return User_group::staticGet('id', $group->group_id); return User_group::staticGet('id', $group->group_id);
@ -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');
} }
@ -455,7 +454,7 @@ class User_group extends Memcached_DataObject
$group = new User_group(); $group = new User_group();
$group->query('BEGIN'); $group->query('BEGIN');
if (empty($uri)) { if (empty($uri)) {
// fill in later... // fill in later...
$uri = null; $uri = null;