]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noticelist.php
Fix for regression introduced with my last update to the
[quix0rs-gnu-social.git] / lib / noticelist.php
index 78abf34a76d512bb6fd289fbd6f4a5ce4fabf153..a4a0f2651a190084f67e811fc540f914cecc0050 100644 (file)
@@ -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);
@@ -555,11 +571,8 @@ class NoticeListItem extends Widget
 
             $this->out->raw(_('Repeated by'));
 
-            $avatar = $repeater->getAvatar(AVATAR_MINI_SIZE);
-
             $this->out->elementStart('a', $attrs);
-
-            $this->out->element('span', 'nickname', $repeater->nickname);
+            $this->out->element('span', 'fn nickname', $repeater->nickname);
             $this->out->elementEnd('a');
 
             $this->out->elementEnd('span');