better stats

darcs-hash:20080519142807-84dde-0d9a0a3d70e935a0264215fa1c18082d78057e36.gz
This commit is contained in:
Evan Prodromou 2008-05-19 10:28:07 -04:00
parent 0240e9951a
commit 9bbf34c51c

View File

@ -194,7 +194,8 @@ class ShowstreamAction extends StreamAction {
// XXX: WORM cache this // XXX: WORM cache this
$subs = DB_DataObject::factory('subscription'); $subs = DB_DataObject::factory('subscription');
$subs->subscriber = $profile->id; $subs->subscriber = $profile->id;
$subs_count = $subs->count(); $subs->whereAdd("subscriber=".$profile->id);
$subs_count = $subs->count(DB_DATAOBJECT_WHEREADD_ONLY);
if (!$subs_count) { if (!$subs_count) {
$subs_count = 0; $subs_count = 0;
@ -202,7 +203,8 @@ class ShowstreamAction extends StreamAction {
$subbed = DB_DataObject::factory('subscription'); $subbed = DB_DataObject::factory('subscription');
$subbed->subscribed = $profile->id; $subbed->subscribed = $profile->id;
$subbed_count = $subbed->count(); $subbed->whereAdd("subscribed=".$profile->id);
$subbed_count = $subbed->count(DB_DATAOBJECT_WHEREADD_ONLY);
if (!$subbed_count) { if (!$subbed_count) {
$subbed_count = 0; $subbed_count = 0;