X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsubs.php;h=e76023752725344128009f3dc2af602c9d3d5b93;hb=6c3149334cf69a33026a75be9f5ea579b2de3b8d;hp=0e7b9ded522c07e55811fc313ad084e046221e5c;hpb=be21ed13b5160646cc4feb7c572d878bc0ee464d;p=quix0rs-gnu-social.git diff --git a/lib/subs.php b/lib/subs.php index 0e7b9ded52..e760237527 100644 --- a/lib/subs.php +++ b/lib/subs.php @@ -1,7 +1,7 @@ isSubscribed($other)) { return _('Already subscribed!.'); } @@ -60,12 +59,16 @@ function subs_subscribe_to($user, $other) subs_notify($other, $user); - $cache = common_memcache(); + $cache = common_memcache(); if ($cache) { $cache->delete(common_cache_key('user:notices_with_friends:' . $user->id)); } + $profile = $user->getProfile(); + + $profile->blowSubscriptionsCount(); + $other->blowSubscribersCount(); if ($other->autosubscribe && !$other->isSubscribed($user) && !$user->hasBlocked($other)) { if (!$other->subscribeTo($user)) { @@ -117,7 +120,6 @@ function subs_unsubscribe_user($user, $other_nickname) function subs_unsubscribe_to($user, $other) { - if (!$user->isSubscribed($other)) return _('Not subscribed!.'); @@ -139,6 +141,11 @@ function subs_unsubscribe_to($user, $other) $cache->delete(common_cache_key('user:notices_with_friends:' . $user->id)); } + $profile = $user->getProfile(); + + $profile->blowSubscriptionsCount(); + $other->blowSubscribersCount(); + return true; }