X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FProfile_tag_subscription.php;h=f7b1553300b52010faae091c0fb69916028cd61a;hb=f29daa22b6a7319632b2c3798313f54a6b762a10;hp=ce4a57e87072f100aa62d30e3c2e0e055fd2446e;hpb=59043dca7fb6f974b11797c4d0f20e5b78b0611d;p=quix0rs-gnu-social.git diff --git a/classes/Profile_tag_subscription.php b/classes/Profile_tag_subscription.php index ce4a57e870..f7b1553300 100644 --- a/classes/Profile_tag_subscription.php +++ b/classes/Profile_tag_subscription.php @@ -15,10 +15,6 @@ class Profile_tag_subscription extends Managed_DataObject public $created; // datetime not_null default_0000-00-00%2000%3A00%3A00 public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP - /* Static get */ - function staticGet($k,$v=null) - { return Memcached_DataObject::staticGet('Profile_tag_subscription',$k,$v); } - /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE @@ -45,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) { @@ -77,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)); @@ -118,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(); @@ -136,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); }