]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Output "web" instead of gettext translation file metadata when notice.source is empty
authorBrion Vibber <brion@pobox.com>
Thu, 12 Aug 2010 01:53:34 +0000 (18:53 -0700)
committerBrion Vibber <brion@pobox.com>
Thu, 12 Aug 2010 01:53:34 +0000 (18:53 -0700)
lib/noticelist.php

index dbc5bfb519afb5bd7a2b8d418ec972e555120850..529d6a3f90752c4a82457c4dc49f1563b23127c2 100644 (file)
@@ -499,7 +499,7 @@ class NoticeListItem extends Widget
         $ns = $this->notice->getSource();
 
         if ($ns) {
-            $source_name = (empty($ns->name)) ? _($ns->code) : _($ns->name);
+            $source_name = (empty($ns->name)) ? ($ns->code ? _($ns->code) : _('web')) : _($ns->name);
             $this->out->text(' ');
             $this->out->elementStart('span', 'source');
             // FIXME: probably i18n issue. If "from" is followed by text, that should be a parameter to "from" (from %s).