summaryrefslogtreecommitdiff
path: root/lib/noticelist.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2010-02-02 17:00:10 -0500
committerCraig Andrews <candrews@integralblue.com>2010-02-02 17:00:10 -0500
commit057ec1fceacbfec1f755a5bc6700a188aa70e33f (patch)
tree297839a71d9d3a7a0a7935d5dbcc9c4a3c6c99bb /lib/noticelist.php
parentd14651706cf728f116b7ae44c6a6e37b5eb918a4 (diff)
parentf60f2c523f2e7018ea923898931287e7a99e8f44 (diff)
Merge branch '0.9.x' into 1.0.x
Conflicts: EVENTS.txt lib/imqueuehandler.php lib/jabber.php lib/util.php plugins/Xmpp/Sharing_XMPP.php
Diffstat (limited to 'lib/noticelist.php')
-rw-r--r--lib/noticelist.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php
index 85c169716..a4a0f2651 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -486,12 +486,28 @@ class NoticeListItem extends Widget
$this->out->element('span', 'device', $source_name);
break;
default:
+
+ $name = null;
+ $url = null;
+
$ns = Notice_source::staticGet($this->notice->source);
+
if ($ns) {
+ $name = $ns->name;
+ $url = $ns->url;
+ } else {
+ $app = Oauth_application::staticGet('name', $this->notice->source);
+ if ($app) {
+ $name = $app->name;
+ $url = $app->source_url;
+ }
+ }
+
+ if (!empty($name) && !empty($url)) {
$this->out->elementStart('span', 'device');
- $this->out->element('a', array('href' => $ns->url,
+ $this->out->element('a', array('href' => $url,
'rel' => 'external'),
- $ns->name);
+ $name);
$this->out->elementEnd('span');
} else {
$this->out->element('span', 'device', $source_name);