summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-05-06 18:49:01 -0700
committerBrion Vibber <brion@pobox.com>2010-05-06 18:49:01 -0700
commitd9c1ac9053ee3e4ddb861d1467bb065a4bfab3bf (patch)
treee54220748cb5f22abfe555c69b9f46f567cb2933 /actions
parent3e8af172d636cc7ca3a9e2301b928f6ca79b9eb2 (diff)
parentd57e1deaec7406c63f70b8a5664746d18c1125ff (diff)
Merge branch '0.9.x' into 1.0.x
Diffstat (limited to 'actions')
-rw-r--r--actions/twitapisearchatom.php20
1 files changed, 17 insertions, 3 deletions
diff --git a/actions/twitapisearchatom.php b/actions/twitapisearchatom.php
index 24aa619bd..51e8a8881 100644
--- a/actions/twitapisearchatom.php
+++ b/actions/twitapisearchatom.php
@@ -342,10 +342,24 @@ class TwitapisearchatomAction extends ApiAction
'rel' => 'related',
'href' => $profile->avatarUrl()));
- // TODO: Here is where we'd put in a link to an atom feed for threads
+ // @todo: Here is where we'd put in a link to an atom feed for threads
+
+ $source = null;
+
+ $ns = $notice->getSource();
+ if ($ns) {
+ if (!empty($ns->name) && !empty($ns->url)) {
+ $source = '<a href="'
+ . htmlspecialchars($ns->url)
+ . '" rel="nofollow">'
+ . htmlspecialchars($ns->name)
+ . '</a>';
+ } else {
+ $source = $ns->code;
+ }
+ }
- $this->element("twitter:source", null,
- htmlentities($this->sourceLink($notice->source)));
+ $this->element("twitter:source", null, $source);
$this->elementStart('author');