summaryrefslogtreecommitdiff
path: root/classes/Profile.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@status.net>2010-08-06 10:56:18 -0700
committerBrion Vibber <brion@status.net>2010-08-06 11:49:52 -0700
commit7e55fc00447923b40b2ffc87329fd95347d776f5 (patch)
treec0ec54c201306fc1ee781676c9080ec0b6815dbb /classes/Profile.php
parentebd2fc2f7cb799cc190b2d4a77d8d0057a8854c0 (diff)
OStatus/FeedSub: tweaked PuSH feed garbage collection so other plugins can declare usage of a low-level feed or an OStatus profile besides profile subscriptions & group memberships.
SubMirror: redid add-mirror frontend to accept a feed URL, then pass that on to OStatus, instead of pulling from your subscriptions. Profile: tweaked subscriberCount() so it doesn't subtract 1 for foreign profiles who aren't subscribed to themselves; instead excludes the self-subscription in the count query. Memcached_DataObject: tweak to avoid extra error spew in the DB error raising Work in progress: tweaking feedsub garbage collection so we can count other uses
Diffstat (limited to 'classes/Profile.php')
-rw-r--r--classes/Profile.php4
1 files changed, 1 insertions, 3 deletions
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);
}