);
}
- function pkeyGet($kv)
- {
- return Memcached_DataObject::pkeyGet('Profile_tag_subscription', $kv);
- }
-
static function add($peopletag, $profile)
{
if ($peopletag->private) {
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));
$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();
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);
}