diff options
author | Zach Copley <zach@status.net> | 2010-05-12 15:08:01 -0700 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-05-18 15:17:05 -0700 |
commit | 114df39822d7007f1b08b83b4e9a26202936e8c8 (patch) | |
tree | 3d2a50da463ea087e6e4c683211f018125d0d093 | |
parent | 5ea019c41ac4d6c161f3c8f287d405971d4aadea (diff) |
Need to always emit statusnet:notice_info so it's available in profile feeds
-rw-r--r-- | classes/Notice.php | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/classes/Notice.php b/classes/Notice.php index 0dc7e10e7..e173a2469 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1211,24 +1211,6 @@ class Notice extends Memcached_DataObject $xs->element('icon', null, $profile->avatarUrl(AVATAR_PROFILE_SIZE)); $xs->element('updated', null, common_date_w3dtf($this->created)); - - $noticeInfoAttr = array( - 'local_id' => $this->id, // local notice ID (useful to clients for ordering) - 'source' => $this->source // the client name (source attribution) - ); - - $ns = $this->getSource(); - if ($ns) { - if (!empty($ns->url)) { - $noticeInfoAttr['source_link'] = $ns->url; - } - } - - if (!empty($cur)) { - $noticeInfoAttr['favorited'] = ($cur->hasFave($this)) ? 'true' : 'false'; - } - - $xs->element('statusnet:notice_info', $noticeInfoAttr, null); } if ($source) { @@ -1251,6 +1233,24 @@ class Notice extends Memcached_DataObject $xs->element('published', null, common_date_w3dtf($this->created)); $xs->element('updated', null, common_date_w3dtf($this->created)); + $noticeInfoAttr = array( + 'local_id' => $this->id, // local notice ID (useful to clients for ordering) + 'source' => $this->source // the client name (source attribution) + ); + + $ns = $this->getSource(); + if ($ns) { + if (!empty($ns->url)) { + $noticeInfoAttr['source_link'] = $ns->url; + } + } + + if (!empty($cur)) { + $noticeInfoAttr['favorited'] = ($cur->hasFave($this)) ? 'true' : 'false'; + } + + $xs->element('statusnet:notice_info', $noticeInfoAttr, null); + if ($this->reply_to) { $reply_notice = Notice::staticGet('id', $this->reply_to); if (!empty($reply_notice)) { |