summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/Memcached_DataObject.php2
-rw-r--r--classes/Profile.php4
2 files changed, 2 insertions, 4 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php
index 7768fe757..0f1ed0489 100644
--- a/classes/Memcached_DataObject.php
+++ b/classes/Memcached_DataObject.php
@@ -574,7 +574,7 @@ class Memcached_DataObject extends Safe_DataObject
function raiseError($message, $type = null, $behaviour = null)
{
$id = get_class($this);
- if ($this->id) {
+ if (!empty($this->id)) {
$id .= ':' . $this->id;
}
if ($message instanceof PEAR_Error) {
diff --git a/classes/Profile.php b/classes/Profile.php
index 0d0463b73..d7617f0b7 100644
--- a/classes/Profile.php
+++ b/classes/Profile.php
@@ -464,11 +464,9 @@ class Profile extends Memcached_DataObject
$sub = new Subscription();
$sub->subscribed = $this->id;
-
+ $sub->whereAdd('subscriber != subscribed');
$cnt = (int) $sub->count('distinct subscriber');
- $cnt = ($cnt > 0) ? $cnt - 1 : $cnt;
-
if (!empty($c)) {
$c->set(common_cache_key('profile:subscriber_count:'.$this->id), $cnt);
}