* fix bug for standard.
This commit is contained in:
@@ -447,7 +447,7 @@ CREATE TABLE `zt_history` (
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `action` (`action`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE `zt_pipeline` (
|
||||
CREATE TABLE `zt_jenkins` (
|
||||
`id` smallint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) NOT NULL,
|
||||
`url` varchar(255) DEFAULT NULL,
|
||||
|
||||
@@ -181,6 +181,7 @@ class repoModel extends model
|
||||
if($repo->encrypt == 'base64') $repo->password = base64_decode($repo->password);
|
||||
$repo->acl = json_decode($repo->acl);
|
||||
if($type == 'haspriv' and !$this->checkPriv($repo)) unset($repos[$i]);
|
||||
if(strtolower($repo->SCM) == 'gitlab') $repo = $this->processGitlab($repo);
|
||||
}
|
||||
|
||||
return $repos;
|
||||
@@ -613,6 +614,7 @@ class repoModel extends model
|
||||
{
|
||||
$repo = $this->getRepoByID($repoID);
|
||||
if(empty($repo)) return array();
|
||||
|
||||
return $this->dao->select('id,name')->from(TABLE_PRODUCT)
|
||||
->where('id')->in($repo->product)
|
||||
->andWhere('deleted')->eq(0)
|
||||
@@ -1786,10 +1788,11 @@ class repoModel extends model
|
||||
*/
|
||||
public function processGitlab($repo)
|
||||
{
|
||||
$gitlab = $this->loadModel('gitlab')->getByID($repo->client); // The $repo->client is gitlabID
|
||||
$gitlab = $this->loadModel('gitlab')->getByID($repo->client); // The $repo->client is gitlabID.
|
||||
if(!$gitlab) return $repo;
|
||||
|
||||
$repo->gitlab = $gitlab->id;
|
||||
$repo->project = $repo->path; // The projectID in gitlab
|
||||
$repo->project = $repo->path; // The projectID in gitlab.
|
||||
$repo->path = sprintf($this->config->repo->gitlab->apiPath, $gitlab->url, $repo->path);
|
||||
$repo->client = $gitlab->url;
|
||||
$repo->password = $gitlab->token;
|
||||
|
||||
Reference in New Issue
Block a user