summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-05-12 15:08:01 -0700
committerZach Copley <zach@status.net>2010-05-12 15:08:01 -0700
commitdf034f0a1e96acc2f495fc2c9e024cd79a0e8a49 (patch)
tree4cd7c40e6c7e8b6319e0377e4a912e2e5275128f /classes/Notice.php
parent7ce231c7c1f6514bbf4562245290ee49b217afe9 (diff)
Need to always emit statusnet:notice_info so it's available in profile feeds
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php36
1 files changed, 18 insertions, 18 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 875bcaa02..7c3b5b519 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -1212,24 +1212,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) {
@@ -1252,6 +1234,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)) {