]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/profileminilist.php
typo in profileminilist class
[quix0rs-gnu-social.git] / lib / profileminilist.php
index 0d466bba81e7be3139c3b7e03cc99ac6545b8a27..09bef6f7c6158a054c806b210add89c8b3b2daea 100644 (file)
@@ -33,7 +33,7 @@ if (!defined('LACONICA')) {
 
 require_once INSTALLDIR.'/lib/profilelist.php';
 
-define('PROFILES_PER_MINILIST', 80);
+define('PROFILES_PER_MINILIST', 27);
 
 /**
  * Widget to show a list of profiles, good for sidebar
@@ -47,26 +47,20 @@ define('PROFILES_PER_MINILIST', 80);
 
 class ProfileMiniList extends ProfileList
 {
-    function show()
+    function startList()
     {
         $this->out->elementStart('ul', 'entities users xoxo');
+    }
 
-        $cnt = 0;
-
-        while ($this->profile->fetch()) {
-            $cnt++;
-            if($cnt > PROFILES_PER_MINILIST) {
-                break;
-            }
-            $this->showProfile();
-        }
-
-        $this->out->elementEnd('ul');
-
-        return $cnt;
+    function newListItem($profile)
+    {
+        return new ProfileMiniListItem($profile, $this->action);
     }
+}
 
-    function showProfile()
+class ProfileMiniListItem extends ProfileListItem
+{
+    function show()
     {
         $this->out->elementStart('li', 'vcard');
         $this->out->elementStart('a', array('title' => $this->profile->getBestName(),