]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/peopletagsection.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / lib / peopletagsection.php
index 6722f3a149599fff414beb270fe5e53568e3622a..09953945160833adc519d10920d44f13cbecc2d0 100644 (file)
@@ -46,9 +46,10 @@ define('PEOPLETAGS_PER_SECTION', 6);
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class PeopletagSection extends Section
 {
+    protected $avatarSize = AVATAR_MINI_SIZE;
+
     function showContent()
     {
         $tags = $this->getPeopletags();
@@ -105,14 +106,15 @@ class PeopletagSectionItem extends PeopletagListItem
             common_log(LOG_WARNING, "Trying to show missing peopletag; skipping.");
             return;
         }
+        $mode = ($this->peopletag->private) ? 'private' : 'public';
 
         $this->out->elementStart('tr');
 
-        $this->out->elementStart('td', 'peopletag');
+        $this->out->elementStart('td', 'peopletag mode-' . $mode);
         $this->showPeopletag();
         $this->out->elementEnd('td');
 
-        if ($this->peopletag->value) {
+        if (isset($this->peopletag->value)) {
             $this->out->element('td', 'value', $this->peopletag->value);
         }
         $this->out->elementEnd('tr');
@@ -120,10 +122,14 @@ class PeopletagSectionItem extends PeopletagListItem
 
     function showTag()
     {
-        $title = _('Tagged: ') . $this->peopletag->taggedCount() .
-                 ' ' . _('Subscribers: ') . $this->peopletag->subscriberCount();
+        // TRANS: List summary. %1$d is the number of users in the list,
+        // TRANS: %2$d is the number of subscribers to the list.
+        $title = sprintf(_('Listed: %1$d Subscribers: %2$d'),
+                         $this->peopletag->taggedCount(),
+                         $this->peopletag->subscriberCount());
 
         $this->out->elementStart('span', 'entry-title tag');
+
         $this->out->element('a',
             array('rel'   => 'bookmark',
                   'href'  => $this->url(),
@@ -131,9 +137,4 @@ class PeopletagSectionItem extends PeopletagListItem
             htmlspecialchars($this->peopletag->tag));
         $this->out->elementEnd('span');
     }
-
-    function showAvatar()
-    {
-        parent::showAvatar(AVATAR_MINI_SIZE);
-    }
 }