public $subscriber_count; // smallint
/* Static get */
- function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('Profile_list',$k,$v); }
+ function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Profile_list',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
function getSubscribers($offset=0, $limit=null, $since=0, $upto=0)
{
$subs = new Profile();
- $sub = new Profile_tag_subscription();
- $sub->profile_tag_id = $this->id;
- $subs->joinAdd($sub);
+ $subs->joinAdd(
+ array('id', 'profile_tag_subscription:profile_id')
+ );
+ $subs->whereAdd('profile_tag_subscription.profile_tag_id = ' . $this->id);
+
$subs->selectAdd('unix_timestamp(profile_tag_subscription.' .
'created) as "cursor"');
Profile_tag::cleanup($this);
Profile_tag_subscription::cleanup($this);
+ self::blow('profile:lists:%d', $this->tagger);
+
return parent::delete();
}
return new ArrayWrapper($wrapped);
}
}
+
+ function insert()
+ {
+ $result = parent::insert();
+ if ($result) {
+ self::blow('profile:lists:%d', $this->tagger);
+ }
+ return $result;
+ }
}