diff --git a/module/job/control.php b/module/job/control.php index ac4677c3c0..d25c6a0fe9 100644 --- a/module/job/control.php +++ b/module/job/control.php @@ -38,6 +38,9 @@ class job extends control */ public function browse($repoID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { + $repos = $this->loadModel('repo')->getRepoPairs('devops'); + if(empty($repos)) $this->locate($this->repo->createLink('create')); + /* Set session. */ $this->loadModel('ci')->setMenu($repoID); diff --git a/module/repo/model.php b/module/repo/model.php index d417ca9f3a..fc8e128802 100644 --- a/module/repo/model.php +++ b/module/repo/model.php @@ -53,9 +53,10 @@ class repoModel extends model echo(js::alert($this->lang->repo->error->accessDenied)); return print(js::locate('back')); } - } - $this->lang->switcherMenu = $this->getSwitcher($repoID); + if($repo->SCM != 'Gitlab') unset($this->lang->devops->menu->mr); + $this->lang->switcherMenu = $this->getSwitcher($repoID); + } common::setMenuVars('devops', $repoID); if(!session_id()) session_start();