* Add testcase.

This commit is contained in:
caoyanyi
2022-01-27 03:15:48 +00:00
parent f3b82a01e2
commit 8e2db7b2cb
4 changed files with 125 additions and 2 deletions
+4 -2
View File
@@ -601,7 +601,7 @@ class gitlabModel extends model
* @access public
* @return object
*/
public function apiGetGroups($gitlabID, $orderBy, $minRole = '')
public function apiGetGroups($gitlabID, $orderBy = 'id_desc', $minRole = '')
{
$apiRoot = $this->getApiRoot($gitlabID);
$url = sprintf($apiRoot, "/groups");
@@ -614,7 +614,9 @@ class gitlabModel extends model
$url .= "&min_access_level=$this->config->gitlab->accessLevel[$minRole]";
}
list($order, $sort) = explode('_', $orderBy);
$order = 'id';
$sort = 'desc';
if(strpos($orderBy, '_') !== false) list($order, $sort) = explode('_', $orderBy);
$allResults = array();
for($page = 1; true; $page++)