]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/profileminilist.php
use an array of profiles rather than a looping cursor for profile lists
[quix0rs-gnu-social.git] / lib / profileminilist.php
index 36bfad770cf02a01cf081131abc0851a79872908..2c3fc4642d9f92fb80994d2d4026e50481db9c79 100644 (file)
@@ -58,22 +58,15 @@ class ProfileMiniList extends ProfileList
         return new ProfileMiniListItem($profile, $this->action);
     }
 
-    function showProfiles()
+    function maxProfiles()
     {
-        $cnt = 0;
-
-        while ($this->profile->fetch()) {
-            $cnt++;
-            if ($cnt > PROFILES_PER_MINILIST) {
-                break;
-            }
-            $pli = $this->newListItem($this->profile);
-            $pli->show();
-        }
-
-        return $cnt;
+        return PROFILES_PER_MINILIST;
     }
 
+    function avatarSize()
+    {
+        return AVATAR_MINI_SIZE;
+    }
 }
 
 class ProfileMiniListItem extends ProfileListItem