]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Group listing in Directory plugin works again
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 23 Jun 2014 17:02:47 +0000 (19:02 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 23 Jun 2014 17:02:47 +0000 (19:02 +0200)
plugins/Directory/lib/sortablegrouplist.php
plugins/ModPlus/ModPlusPlugin.php

index fbb8ba826fcafcdb8005e1ee3289ffa94a4d09f2..2849e75eba6fb69c5e8fc8f84dac17218d966d1c 100644 (file)
@@ -167,12 +167,13 @@ class SortableGroupListItem extends SortableSubscriptionListItem
 
     }
 
+    // TODO: Make sure we can do ->getAvatar() for group profiles too!
     function showAvatar(Profile $profile, $size=null)
     {
         $logo = $profile->getGroup()->stream_logo ?: User_group::defaultLogo($size ?: $this->avatarSize());
 
         $this->out->element('img', array('src'    => $logo,
-                                         'class'  => 'photo avatar',
+                                         'class'  => 'avatar u-photo',
                                          'width'  => AVATAR_STREAM_SIZE,
                                          'height' => AVATAR_STREAM_SIZE,
                                          'alt'    => $profile->getBestName()));
@@ -205,14 +206,11 @@ class SortableGroupListItem extends SortableSubscriptionListItem
     {
         $this->startProfile();
 
-        $this->out->elementStart('a', array('href'  => $this->profile->homeUrl(),
-                                            'class' => 'h-card p-org p-nickname',
-                                            'rel'   => 'contact group'));
-        // getProfile here is because $this->profile is a User_group, which it should stop
-        // being by making sure the group listing runs a ->getGroup when it's necessary.
         $this->showAvatar($this->profile->getProfile());
-        $this->out->text($this->profile->getNickname());
-        $this->out->elementEnd('a');
+        $this->out->element('a', array('href'  => $this->profile->homeUrl(),
+                                            'class' => 'p-org p-nickname',
+                                            'rel'   => 'contact group'),
+                                 $this->profile->getNickname());
 
         $this->showFullName();
         $this->showLocation();
index 8b32db7866b6c4884cfc864456d5eb98e55fb3df..87ffe10e1ee4fd75990249c59bda038a7d4f1994 100644 (file)
@@ -99,7 +99,7 @@ class ModPlusPlugin extends Plugin
      */
     function onStartProfileListItemProfile($item)
     {
-        $this->showProfileOptions($item->out, $item->profile);
+        $this->showProfileOptions($item->out, $item->profile->getProfile());
         return true;
     }