From 7cdcb89dc9d8dcc04848928c5b765f99566d2a4d Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 12 Mar 2010 00:36:26 +0000 Subject: [PATCH] Add id and updated elements to atom source --- classes/Notice.php | 2 ++ classes/User_group.php | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/classes/Notice.php b/classes/Notice.php index 4c7e6ab4b7..40a6263e52 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1128,6 +1128,7 @@ class Notice extends Memcached_DataObject if ($source) { $xs->elementStart('source'); + $xs->element('id', null, $profile->profileurl); $xs->element('title', null, $profile->nickname . " - " . common_config('site', 'name')); $xs->element('link', array('href' => $profile->profileurl)); $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('updated', null, common_date_w3dtf($this->created)); } if ($source) { diff --git a/classes/User_group.php b/classes/User_group.php index 0460c9870a..f295945025 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -295,7 +295,7 @@ class User_group extends Memcached_DataObject } // If not, check local groups. - + $group = Local_group::staticGet('nickname', $nickname); if (!empty($group)) { return User_group::staticGet('id', $group->group_id); @@ -371,11 +371,10 @@ class User_group extends Memcached_DataObject if ($source) { $xs->elementStart('source'); + $xs->element('id', null, $this->permalink()); $xs->element('title', null, $profile->nickname . " - " . common_config('site', 'name')); $xs->element('link', array('href' => $this->permalink())); - } - - if ($source) { + $xs->element('updated', null, $this->modified); $xs->elementEnd('source'); } @@ -455,7 +454,7 @@ class User_group extends Memcached_DataObject $group = new User_group(); $group->query('BEGIN'); - + if (empty($uri)) { // fill in later... $uri = null;