X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FProfile_tag_subscription.php;h=f7b1553300b52010faae091c0fb69916028cd61a;hb=29f09227053a0f39b812230adc36871c79f0c9e9;hp=ab2ceed73b85feacb2013025a2da7293eab14a21;hpb=1a9a8ea73032b0ded09a8ea9a4c0511401507090;p=quix0rs-gnu-social.git diff --git a/classes/Profile_tag_subscription.php b/classes/Profile_tag_subscription.php index ab2ceed73b..f7b1553300 100644 --- a/classes/Profile_tag_subscription.php +++ b/classes/Profile_tag_subscription.php @@ -41,11 +41,6 @@ class Profile_tag_subscription extends Managed_DataObject ); } - function pkeyGet($kv) - { - return Memcached_DataObject::pkeyGet('Profile_tag_subscription', $kv); - } - static function add($peopletag, $profile) { if ($peopletag->private) { @@ -73,7 +68,7 @@ class Profile_tag_subscription extends Managed_DataObject throw new Exception(_('Adding list subscription failed.')); } - $ptag = Profile_list::staticGet('id', $peopletag->id); + $ptag = Profile_list::getKV('id', $peopletag->id); $ptag->subscriberCount(true); Event::handle('EndSubscribePeopletag', array($peopletag, $profile)); @@ -114,7 +109,7 @@ class Profile_tag_subscription extends Managed_DataObject $subs->find(); while($subs->fetch()) { - $profile = Profile::staticGet('id', $subs->profile_id); + $profile = Profile::getKV('id', $subs->profile_id); Event::handle('StartUnsubscribePeopletag', array($profile_list, $profile)); // Delete anyway $subs->delete(); @@ -132,10 +127,10 @@ class Profile_tag_subscription extends Managed_DataObject return $result; } - function delete() + function delete($useWhere=false) { - $result = parent::delete(); - if ($result) { + $result = parent::delete($useWhere); + if ($result !== false) { self::blow('profile_list:subscriber_count:%d', $this->profile_tag_id); }