]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Profile_tag_subscription.php
Don't store object type for verbs (as they don't have it)
[quix0rs-gnu-social.git] / classes / Profile_tag_subscription.php
index ab2ceed73b85feacb2013025a2da7293eab14a21..f7b1553300b52010faae091c0fb69916028cd61a 100644 (file)
@@ -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);
         }