* Modify gitlab issue route.
This commit is contained in:
@@ -965,17 +965,13 @@ class gitlab extends control
|
||||
/**
|
||||
* Import gitlab issue to zentaopms.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function importIssue($repoID)
|
||||
public function importIssue($gitlabID, $projectID)
|
||||
{
|
||||
$repo = $this->loadModel('repo')->getRepoByID($repoID);
|
||||
$productIDList = explode(',', $repo->product);
|
||||
$gitlabID = $repo->gitService;
|
||||
$projectID = $repo->project;
|
||||
|
||||
$gitlab = $this->gitlab->getByID($gitlabID);
|
||||
if($gitlab) $user = $this->gitlab->apiGetCurrentUser($gitlab->url, $gitlab->token);
|
||||
if(empty($user->is_admin)) return print(js::alert($this->lang->gitlab->tokenLimit) . js::locate($this->createLink('gitlab', 'edit', array('gitlabID' => $gitlabID))));
|
||||
@@ -1052,13 +1048,11 @@ class gitlab extends control
|
||||
}
|
||||
}
|
||||
|
||||
$products = array('' => '');
|
||||
$this->loadModel("product");
|
||||
foreach($productIDList as $productID) $products[$productID] = $this->product->getByID($productID)->name;
|
||||
$products = $this->loadModel("product")->getPairs();
|
||||
|
||||
$this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->importIssue;
|
||||
$this->view->importable = empty($gitlabIssues) ? false : true;
|
||||
$this->view->products = $products;
|
||||
$this->view->products = array('' => '') + $products;
|
||||
$this->view->gitlabID = $gitlabID;
|
||||
$this->view->gitlabProjectID = $projectID;
|
||||
$this->view->objectTypes = $this->config->gitlab->objectTypes;
|
||||
|
||||
Reference in New Issue
Block a user