* Fix bug#19866

This commit is contained in:
zenggang
2022-02-23 07:14:06 +00:00
parent 6d0529f2ad
commit 574b5400d1
3 changed files with 22 additions and 4 deletions
+5 -1
View File
@@ -685,15 +685,19 @@ class gitlabModel extends model
*
* @param int $gitlabID
* @param string $simple
* @param int $minID
* @param int $maxID
* @access public
* @return array
*/
public function apiGetProjects($gitlabID, $simple = 'true')
public function apiGetProjects($gitlabID, $simple = 'true', $minID = 0, $maxID = 0)
{
$apiRoot = $this->getApiRoot($gitlabID);
if(!$apiRoot) return array();
$url = sprintf($apiRoot, "/projects");
if($minID > 0) $url .= '&id_after=' . (intval($minID) - 1);
if($maxID > 0) $url .= '&id_before=' . (intval($maxID) + 1);
$allResults = array();
for($page = 1; true; $page++)