Show correct number of profile avatars and 'all' link in subs asides
This commit is contained in:
parent
6bc37a3254
commit
734f631e1e
|
@ -108,7 +108,9 @@ class ProfileAction extends OwnerDesignAction
|
|||
|
||||
$this->element('h2', null, _('Subscriptions'));
|
||||
|
||||
if ($profile) {
|
||||
$cnt = 0;
|
||||
|
||||
if (!empty($profile)) {
|
||||
$pml = new ProfileMiniList($profile, $this);
|
||||
$cnt = $pml->show();
|
||||
if ($cnt == 0) {
|
||||
|
@ -137,7 +139,9 @@ class ProfileAction extends OwnerDesignAction
|
|||
|
||||
$this->element('h2', null, _('Subscribers'));
|
||||
|
||||
if ($profile) {
|
||||
$cnt = 0;
|
||||
|
||||
if (!empty($profile)) {
|
||||
$pml = new ProfileMiniList($profile, $this);
|
||||
$cnt = $pml->show();
|
||||
if ($cnt == 0) {
|
||||
|
|
|
@ -47,6 +47,7 @@ define('PROFILES_PER_MINILIST', 27);
|
|||
|
||||
class ProfileMiniList extends ProfileList
|
||||
{
|
||||
|
||||
function startList()
|
||||
{
|
||||
$this->out->elementStart('ul', 'entities users xoxo');
|
||||
|
@ -56,6 +57,23 @@ class ProfileMiniList extends ProfileList
|
|||
{
|
||||
return new ProfileMiniListItem($profile, $this->action);
|
||||
}
|
||||
|
||||
function showProfiles()
|
||||
{
|
||||
$cnt = 0;
|
||||
|
||||
while ($this->profile->fetch()) {
|
||||
$cnt++;
|
||||
if ($cnt > PROFILES_PER_MINILIST) {
|
||||
break;
|
||||
}
|
||||
$pli = $this->newListItem($this->profile);
|
||||
$pli->show();
|
||||
}
|
||||
|
||||
return $cnt;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ProfileMiniListItem extends ProfileListItem
|
||||
|
|
Loading…
Reference in New Issue
Block a user