]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noticelist.php
Document messages for which clarification was requested.
[quix0rs-gnu-social.git] / lib / noticelist.php
index 0d4cd4dd91c7d87ab68a89065be58121b1f345fc..b7855048768f294293573245e75204aecbd20e20 100644 (file)
@@ -340,8 +340,9 @@ class NoticeListItem extends Widget
 
     function showNickname()
     {
-        $this->out->element('span', array('class' => 'nickname fn'),
-                            $this->profile->nickname);
+        $this->out->raw('<span class="nickname fn">' .
+                        htmlspecialchars($this->profile->nickname) .
+                        '</span>');
     }
 
     /**
@@ -425,10 +426,18 @@ class NoticeListItem extends Widget
         if (empty($name)) {
             $latdms = $this->decimalDegreesToDMS(abs($lat));
             $londms = $this->decimalDegreesToDMS(abs($lon));
+            // TRANS: Used in coordinates as abbreviation of north
+            $north = _('N')
+            // TRANS: Used in coordinates as abbreviation of south
+            $south = _('S')
+            // TRANS: Used in coordinates as abbreviation of east
+            $east = _('E')
+            // TRANS: Used in coordinates as abbreviation of west
+            $west = _('W')
             $name = sprintf(
                 _('%1$u°%2$u\'%3$u"%4$s %5$u°%6$u\'%7$u"%8$s'),
-                $latdms['deg'],$latdms['min'], $latdms['sec'],($lat>0?_('N'):_('S')),
-                $londms['deg'],$londms['min'], $londms['sec'],($lon>0?_('E'):_('W')));
+                $latdms['deg'],$latdms['min'], $latdms['sec'],($lat>0? $north:$south)),
+                $londms['deg'],$londms['min'], $londms['sec'],($lon>0? $east:$west));
         }
 
         $url  = $location->getUrl();
@@ -542,18 +551,7 @@ class NoticeListItem extends Widget
 
     function showContext()
     {
-        $hasConversation = false;
-        if (!empty($this->notice->conversation)) {
-            $conversation = Notice::conversationStream(
-                $this->notice->conversation,
-                1,
-                1
-            );
-            if ($conversation->N > 0) {
-                $hasConversation = true;
-            }
-        }
-        if ($hasConversation) {
+        if ($this->notice->hasConversation()) {
             $conv = Conversation::staticGet(
                 'id',
                 $this->notice->conversation