X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FProfile_list.php;h=0586a8688c9d20fbe9bd10d6652dd0ce978924ac;hb=efb7d28d830b1057cc0e57496dcb263955bbb358;hp=7de1d15730d054f84b04cf70763b3e6bb0417c7c;hpb=9ef13976fc0fa83ace04866b304dcc80e6adf058;p=quix0rs-gnu-social.git diff --git a/classes/Profile_list.php b/classes/Profile_list.php index 7de1d15730..0586a8688c 100644 --- a/classes/Profile_list.php +++ b/classes/Profile_list.php @@ -49,7 +49,7 @@ class Profile_list extends Memcached_DataObject 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 @@ -185,10 +185,12 @@ class Profile_list extends Memcached_DataObject 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"'); @@ -326,6 +328,8 @@ class Profile_list extends Memcached_DataObject Profile_tag::cleanup($this); Profile_tag_subscription::cleanup($this); + self::blow('profile:lists:%d', $this->tagger); + return parent::delete(); } @@ -910,4 +914,13 @@ class Profile_list extends Memcached_DataObject return new ArrayWrapper($wrapped); } } + + function insert() + { + $result = parent::insert(); + if ($result) { + self::blow('profile:lists:%d', $this->tagger); + } + return $result; + } }