diff options
author | Evan Prodromou <evan@status.net> | 2010-05-21 16:47:57 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-05-21 16:47:57 -0400 |
commit | 6d8e01ad13dd9bc9e149f43a1eb88671d4737f4d (patch) | |
tree | 12f8b318971d1a1eebbb318e3c19142a56dce444 /actions/twitapisearchatom.php | |
parent | 8a2144aeed2e338ef1b21425b9387086790aa820 (diff) | |
parent | bbfd6eff0c69f038d151d3bf6c8bf9b45a64716f (diff) |
Merge branch 'master' of gitorious.org:statusnet/mainline
Diffstat (limited to 'actions/twitapisearchatom.php')
-rw-r--r-- | actions/twitapisearchatom.php | 20 |
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'); |