]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apigrouplistall.php
modify group actions so they use Local_group to look up by nickname
[quix0rs-gnu-social.git] / actions / apigrouplistall.php
index d2ef2978aa5427cf1e0ec5dfb6b65b8332e48e2e..e1b54a83229ae1bcf985444d8ceebde0b572ace1 100644 (file)
@@ -134,13 +134,13 @@ class ApiGroupListAllAction extends ApiPrivateAuthAction
 
     function getGroups()
     {
-        $groups = array();
-
-        // XXX: Use the $page, $count, $max_id, $since_id, and $since parameters
+        $qry = 'SELECT user_group.* '.
+          'from user_group join local_group on user_group.id = local_group.group_id '.
+          'order by created desc ';
 
         $group = new User_group();
-        $group->orderBy('created DESC');
-        $group->find();
+
+        $group->query($qry);
 
         while ($group->fetch()) {
             $groups[] = clone($group);