- $cnt = 0;
-
- if ($subs) {
- while ($subs->fetch()) {
- $cnt++;
- if ($cnt % SUBSCRIPTIONS_PER_ROW == 1) {
- common_element_start('div', 'row');
- }
-
- common_element_start('a', array('title' => ($subs->fullname) ?
- $subs->fullname :
- $subs->nickname,
- 'href' => $subs->profileurl,
- 'class' => 'subscription'));
- $avatar = $subs->getAvatar(AVATAR_MINI_SIZE);
- common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_MINI_AVATAR),
- 'width' => AVATAR_MINI_SIZE,
- 'height' => AVATAR_MINI_SIZE,
- 'class' => 'avatar mini',
- 'alt' => ($subs->fullname) ?
- $subs->fullname :
- $subs->nickname));
- common_element_end('a');
-
- if ($cnt % SUBSCRIPTIONS_PER_ROW == 0) {
- common_element_end('div');
- }
-
- if ($cnt == SUBSCRIPTIONS) {
- break;
- }
+ $idx = 0;
+
+ while ($subs->fetch()) {
+ $idx++;
+ if ($idx % SUBSCRIPTIONS_PER_ROW == 1) {
+ common_element_start('div', 'row');
+ }
+
+ $other = Profile::staticGet($subs->subscribed);
+
+ common_element_start('a', array('title' => ($other->fullname) ?
+ $other->fullname :
+ $other->nickname,
+ 'href' => $other->profileurl,
+ 'class' => 'subscription'));
+ $avatar = $other->getAvatar(AVATAR_MINI_SIZE);
+ common_element('img', array('src' => (($avatar) ? $avatar->url : common_default_avatar(AVATAR_MINI_SIZE)),
+ 'width' => AVATAR_MINI_SIZE,
+ 'height' => AVATAR_MINI_SIZE,
+ 'class' => 'avatar mini',
+ 'alt' => ($other->fullname) ?
+ $other->fullname :
+ $other->nickname));
+ common_element_end('a');
+
+ if ($idx % SUBSCRIPTIONS_PER_ROW == 0) {
+ common_element_end('div');
+ }
+
+ if ($idx == SUBSCRIPTIONS) {
+ break;