]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/User_group.php
The overloaded DB_DataObject function staticGet is now called getKV
[quix0rs-gnu-social.git] / classes / User_group.php
index 406537dd8a40f32a84d34ee4c034ae66b173c29e..8f7a0d7b586e7ffa72d58ffc98e1aa74c81e2b4e 100644 (file)
@@ -30,11 +30,6 @@ class User_group extends Managed_DataObject
     public $join_policy;                     // tinyint
     public $force_scope;                     // tinyint
 
-    /* Static get */
-    function staticGet($k,$v=NULL) {
-        return Memcached_DataObject::staticGet('User_group',$k,$v);
-    }
-    
     function multiGet($keyCol, $keyVals, $skipNulls=true)
     {
         return parent::multiGet('User_group', $keyCol, $keyVals, $skipNulls);
@@ -409,7 +404,7 @@ class User_group extends Managed_DataObject
 
         // Are there any matching remote groups this profile's in?
         if ($profile) {
-            $group = $profile->getGroups();
+            $group = $profile->getGroups(0, null);
             while ($group->fetch()) {
                 if ($group->nickname == $nickname) {
                     // @fixme is this the best way?
@@ -420,13 +415,13 @@ class User_group extends Managed_DataObject
 
         // If not, check local groups.
 
-        $group = Local_group::staticGet('nickname', $nickname);
+        $group = Local_group::getKV('nickname', $nickname);
         if (!empty($group)) {
-            return User_group::staticGet('id', $group->group_id);
+            return User_group::getKV('id', $group->group_id);
         }
-        $alias = Group_alias::staticGet('alias', $nickname);
+        $alias = Group_alias::getKV('alias', $nickname);
         if (!empty($alias)) {
-            return User_group::staticGet('id', $alias->group_id);
+            return User_group::getKV('id', $alias->group_id);
         }
         return null;
     }
@@ -570,7 +565,7 @@ class User_group extends Managed_DataObject
 
     static function register($fields) {
         if (!empty($fields['userid'])) {
-            $profile = Profile::staticGet('id', $fields['userid']);
+            $profile = Profile::getKV('id', $fields['userid']);
             if ($profile && !$profile->hasRight(Right::CREATEGROUP)) {
                 common_log(LOG_WARNING, "Attempted group creation from banned user: " . $profile->nickname);
 
@@ -741,7 +736,7 @@ class User_group extends Managed_DataObject
             // or we'll miss clearing some cache keys; that can make it hard
             // to create a new group with one of those names or aliases.
             $this->setAliases(array());
-            $local = Local_group::staticGet('group_id', $this->id);
+            $local = Local_group::getKV('group_id', $this->id);
             if ($local) {
                 $local->delete();
             }