]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't use undefined source_link; instead, just link
authorEvan Prodromou <evan@controlyourself.ca>
Thu, 11 Dec 2008 23:19:25 +0000 (18:19 -0500)
committerEvan Prodromou <evan@controlyourself.ca>
Thu, 11 Dec 2008 23:19:25 +0000 (18:19 -0500)
darcs-hash:20081211231925-5ed1f-b01d6ef925de540f4a671c0814d8715127a4c98d.gz

lib/noticelist.php

index 1ffa802e9b71ec8cd2c3b303417eb304301d526f..2fb52e4270125d2704b4a635c8d2ece4c110c796 100644 (file)
@@ -158,7 +158,25 @@ class NoticeListItem {
     function show_notice_source() {
                if ($this->notice->source) {
                        common_text(_(' from '));
-                       $this->source_link($this->notice->source);
+            $source_name = _($source);
+            switch ($source) {
+             case 'web':
+             case 'xmpp':
+             case 'mail':
+             case 'omb':
+             case 'api':
+                common_element('span', 'noticesource', $source_name);
+                break;
+             default:
+                $ns = Notice_source::staticGet($source);
+                if ($ns) {
+                    common_element('a', array('href' => $ns->url),
+                                   $ns->name);
+                } else {
+                    common_element('span', 'noticesource', $source_name);
+                }
+                break;
+            }
                }
     }