Only show some profiles in events
This commit is contained in:
parent
5df3c8bc4b
commit
3aad58c37f
|
@ -47,6 +47,7 @@ define('PROFILES_PER_MINILIST', 8);
|
||||||
|
|
||||||
class ProfileMiniList extends ProfileList
|
class ProfileMiniList extends ProfileList
|
||||||
{
|
{
|
||||||
|
const MAX_PROFILES = PROFILES_PER_MINILIST; // put it in the class
|
||||||
|
|
||||||
function startList()
|
function startList()
|
||||||
{
|
{
|
||||||
|
|
|
@ -174,9 +174,8 @@ class EventListItem extends NoticeListItemAdapter
|
||||||
foreach ($responses as $response) {
|
foreach ($responses as $response) {
|
||||||
$ids[] = $response->profile_id;
|
$ids[] = $response->profile_id;
|
||||||
}
|
}
|
||||||
common_debug("IDS = " . implode(',', $ids));
|
$ids = array_slice($ids, 0, ProfileMiniList::MAX_PROFILES + 1);
|
||||||
$profiles = Profile::pivotGet('id', $ids);
|
$profiles = Profile::pivotGet('id', $ids);
|
||||||
common_debug("Profiles = " . print_r($profiles, true));
|
|
||||||
$profile = new ArrayWrapper(array_values($profiles));
|
$profile = new ArrayWrapper(array_values($profiles));
|
||||||
$minilist = new ProfileMiniList($profile, $out);
|
$minilist = new ProfileMiniList($profile, $out);
|
||||||
$minilist->show();
|
$minilist->show();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user