]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
override linkAttributes() method for groupmembersminilist
authorEvan Prodromou <evan@status.net>
Mon, 5 Apr 2010 14:47:07 +0000 (10:47 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 5 Apr 2010 14:47:07 +0000 (10:47 -0400)
actions/showgroup.php

index 6e06666909a10b31831859334e1fd4659cbe4eb3..3d369e9ebfbf7d46577be5ba3f0b31d559b76640 100644 (file)
@@ -392,8 +392,8 @@ class ShowgroupAction extends GroupDesignAction
 
             $this->element('h2', null, _('Members'));
 
-            $pml = new ProfileMiniList($member, $this);
-            $cnt = $pml->show();
+            $gmml = new GroupMembersMiniList($member, $this);
+            $cnt = $gmml->show();
             if ($cnt == 0) {
                 $this->element('p', null, _('(None)'));
             }
@@ -507,3 +507,26 @@ class GroupAdminSection extends ProfileSection
         return null;
     }
 }
+
+class GroupMembersMiniList extends ProfileMiniList
+{
+    function newListItem($profile)
+    {
+        return new GroupMembersMiniListItem($profile, $this->action);
+    }
+}
+
+class GroupMembersMiniListItem extends ProfileMiniListItem
+{
+    function linkAttributes()
+    {
+        $aAttrs = parent::linkAttributes();
+
+        if (common_config('nofollow', 'members')) {
+            $aAttrs['rel'] .= ' nofollow';
+        }
+
+        return $aAttrs;
+    }
+}
+