function showProfiles()
{
- // Note: we don't use fetchAll() because it's borked with query()
-
- $profiles = array();
-
- while ($this->profile->fetch()) {
- $profiles[] = clone($this->profile);
- }
-
- $cnt = count($profiles);
+ $cnt = $this->profile->N;
+ $profiles = $this->profile->fetchAll();
$max = min($cnt, $this->maxProfiles());
function showAvatar()
{
- $avatar = $this->profile->getAvatar(AVATAR_STREAM_SIZE);
+ $avatarUrl = $this->profile->avatarUrl(AVATAR_STREAM_SIZE);
$aAttrs = $this->linkAttributes();
$this->out->elementStart('a', $aAttrs);
- $this->out->element('img', array('src' => (!empty($avatar)) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_STREAM_SIZE),
+ $this->out->element('img', array('src' => $avatarUrl,
'class' => 'photo avatar',
'width' => AVATAR_STREAM_SIZE,
'height' => AVATAR_STREAM_SIZE,