From: Zach Copley Date: Thu, 6 May 2010 07:44:56 +0000 (-0700) Subject: Add source link attr to statusnet:notice_info element in Atom output for notices X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=68634f04969d2d7bcbd1d657c466090990dea501;p=quix0rs-gnu-social.git Add source link attr to statusnet:notice_info element in Atom output for notices --- diff --git a/classes/Notice.php b/classes/Notice.php index 2c2c87d560..1965012797 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1215,8 +1215,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';