*Finish task#48107,48106,48105,48103 and adjust code
This commit is contained in:
@@ -669,11 +669,12 @@ class gitlabModel extends model
|
||||
/**
|
||||
* Get projects of one gitlab.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $gitlabID
|
||||
* @param string $simple
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function apiGetProjects($gitlabID)
|
||||
public function apiGetProjects($gitlabID, $simple = 'true')
|
||||
{
|
||||
$apiRoot = $this->getApiRoot($gitlabID);
|
||||
if(!$apiRoot) return array();
|
||||
@@ -683,7 +684,7 @@ class gitlabModel extends model
|
||||
$allResults = array();
|
||||
for($page = 1; true; $page++)
|
||||
{
|
||||
$results = json_decode(commonModel::http($url . "&page={$page}&per_page=100"));
|
||||
$results = json_decode(commonModel::http($url . "&simple={$simple}&page={$page}&per_page=100"));
|
||||
if(!is_array($results)) break;
|
||||
if(!empty($results)) $allResults = array_merge($allResults, $results);
|
||||
if(count($results)<100 or $page > 10) break;
|
||||
|
||||
Reference in New Issue
Block a user