diff options
author | Zach Copley <zach@status.net> | 2010-05-06 00:44:56 -0700 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-05-06 21:48:11 +0000 |
commit | 292ea33dbddeee881474b8f98507213a7d8c159c (patch) | |
tree | 3565f832ea7c496126b78953cc2760bc4c44c208 /classes/Notice.php | |
parent | 22fde00defe79a153ed77ddf6a4e63dd7fef6743 (diff) |
Add source link attr to statusnet:notice_info element in Atom output for notices
Diffstat (limited to 'classes/Notice.php')
-rw-r--r-- | classes/Notice.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/classes/Notice.php b/classes/Notice.php index cd27376a4..b3cfb2813 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1216,8 +1216,14 @@ class Notice extends Memcached_DataObject $noticeInfoAttr = array( 'local_id' => $this->id, // local notice ID (useful to clients for ordering) 'source' => $this->source // the client name (source attribution) - // @todo source source_link - ); + ); + + $ns = $this->getSource(); + if ($ns) { + if (!empty($ns->url)) { + $noticeInfoAttr['source_link'] = htmlentities($ns->url); + } + } if (!empty($cur)) { $noticeInfoAttr['favorited'] = ($cur->hasFave($this)) ? 'true' : 'false'; |