summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-05-19 10:28:07 -0400
committerEvan Prodromou <evan@prodromou.name>2008-05-19 10:28:07 -0400
commit9bbf34c51c9675923926a0477b364c872976a8a4 (patch)
tree16b39fc010a5651be6b97b1252d25a3d7abf77ac
parent0240e9951a4aa7eeb4c20685e3539158bf8c6477 (diff)
better stats
darcs-hash:20080519142807-84dde-0d9a0a3d70e935a0264215fa1c18082d78057e36.gz
-rw-r--r--actions/showstream.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/actions/showstream.php b/actions/showstream.php
index f64af63ec..d40b81581 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -167,7 +167,7 @@ class ShowstreamAction extends StreamAction {
$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');
@@ -194,7 +194,8 @@ class ShowstreamAction extends StreamAction {
// 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;
@@ -202,7 +203,8 @@ class ShowstreamAction extends StreamAction {
$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;