* Fix bug #18920,18919,18918.
This commit is contained in:
@@ -1036,8 +1036,6 @@ class gitlab extends control
|
||||
{
|
||||
$openID = $this->gitlab->getUserIDByZentaoAccount($gitlabID, $this->app->user->account);
|
||||
if(!$openID) return print(js::alert($this->lang->gitlab->mustBindUser) . js::locate($this->createLink('gitlab', 'browse')));
|
||||
|
||||
if(!$this->gitlab->checkUserAccess($gitlabID, $projectID, $project)) return print(js::alert($this->lang->gitlab->noAccess) . js::locate($this->createLink('gitlab', 'browse')));
|
||||
}
|
||||
|
||||
$this->session->set('gitlabTagList', $this->app->getURI(true));
|
||||
|
||||
+11
-2
@@ -1489,10 +1489,19 @@ class gitlabModel extends model
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function apiGetBranches($gitlabID, $projectID)
|
||||
public function apiGetBranches($gitlabID, $projectID, $pager = null)
|
||||
{
|
||||
$url = sprintf($this->getApiRoot($gitlabID), "/projects/{$projectID}/repository/branches");
|
||||
return json_decode(commonModel::http($url));
|
||||
$allResults = array();
|
||||
for($page = 1; true; $page++)
|
||||
{
|
||||
$results = json_decode(commonModel::http($url . "&&page={$page}&per_page=100"));
|
||||
if(!is_array($results)) break;
|
||||
if(!empty($results)) $allResults = array_merge($allResults, $results);
|
||||
if(count($results)<100) break;
|
||||
}
|
||||
|
||||
return $allResults;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user