From 3aad58c37fa54fe7952c1d2d190f701cb4cac269 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 30 Sep 2011 09:40:15 -0400 Subject: [PATCH] Only show some profiles in events --- lib/profileminilist.php | 1 + plugins/Event/eventlistitem.php | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/profileminilist.php b/lib/profileminilist.php index 2c3fc4642d..7418c89232 100644 --- a/lib/profileminilist.php +++ b/lib/profileminilist.php @@ -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() { diff --git a/plugins/Event/eventlistitem.php b/plugins/Event/eventlistitem.php index 2f0710f01f..b563e228f9 100644 --- a/plugins/Event/eventlistitem.php +++ b/plugins/Event/eventlistitem.php @@ -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(); -- 2.39.5