$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,
+ 'height' => AVATAR_MINI_SIZE,
'class' => 'avatar mini'));
common_element_end('a');
// XXX: WORM cache this
$subs = DB_DataObject::factory('subscription');
$subs->subscriber = $profile->id;
- $subs_count = $subs->count();
+ $subs->whereAdd("subscriber=".$profile->id);
+ $subs_count = $subs->count(DB_DATAOBJECT_WHEREADD_ONLY);
if (!$subs_count) {
$subs_count = 0;
$subbed = DB_DataObject::factory('subscription');
$subbed->subscribed = $profile->id;
- $subbed_count = $subbed->count();
+ $subbed->whereAdd("subscribed=".$profile->id);
+ $subbed_count = $subbed->count(DB_DATAOBJECT_WHEREADD_ONLY);
if (!$subbed_count) {
$subbed_count = 0;