]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Only show some profiles in events
authorEvan Prodromou <evan@status.net>
Fri, 30 Sep 2011 13:40:15 +0000 (09:40 -0400)
committerEvan Prodromou <evan@status.net>
Fri, 30 Sep 2011 13:40:15 +0000 (09:40 -0400)
lib/profileminilist.php
plugins/Event/eventlistitem.php

index 2c3fc4642d9f92fb80994d2d4026e50481db9c79..7418c89232ea8efe3bef897d72d0c3a52f69fc82 100644 (file)
@@ -47,6 +47,7 @@ define('PROFILES_PER_MINILIST', 8);
 
 class ProfileMiniList extends ProfileList
 {
+    const MAX_PROFILES = PROFILES_PER_MINILIST; // put it in the class
 
     function startList()
     {
index 2f0710f01f520a91c118c2c6d85c48b3dfb7a30f..b563e228f98ead4c5ed15cc8cd4a638669fcef04 100644 (file)
@@ -174,9 +174,8 @@ class EventListItem extends NoticeListItemAdapter
             foreach ($responses as $response) {
                 $ids[] = $response->profile_id;
             }
-            common_debug("IDS = " . implode(',', $ids));
+            $ids = array_slice($ids, 0, ProfileMiniList::MAX_PROFILES + 1);
             $profiles = Profile::pivotGet('id', $ids);
-            common_debug("Profiles = " . print_r($profiles, true));
             $profile  = new ArrayWrapper(array_values($profiles));
             $minilist = new ProfileMiniList($profile, $out);
             $minilist->show();