From 0e6bc3432ed5df226366ed69a7fb915745670c0a Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Thu, 11 Aug 2022 15:59:51 +0800 Subject: [PATCH] * Modify mr error. --- module/mr/control.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/mr/control.php b/module/mr/control.php index ad54afbbf9..b9494df0ef 100644 --- a/module/mr/control.php +++ b/module/mr/control.php @@ -122,7 +122,7 @@ class mr extends control $giteaUsers = $this->gitea->getGiteaListByAccount(); foreach($hosts as $hostID => $host) { - if($host->type == 'gitLab' and isset($gitlabUsers[$hostID])) continue; + if($host->type == 'gitlab' and isset($gitlabUsers[$hostID])) continue; if($host->type == 'gitea' and isset($giteaUsers[$hostID])) continue; unset($hosts[$hostID]); @@ -186,10 +186,10 @@ class mr extends control if(!$this->app->user->admin and $scm == 'gitlab') { $groupIDList = array(0 => 0); - $groups = $this->scm->apiGetGroups($MR->hostID, 'name_asc', 'developer'); + $groups = $this->$scm->apiGetGroups($MR->hostID, 'name_asc', 'developer'); foreach($groups as $group) $groupIDList[] = $group->id; - $sourceProject = $this->scm->apiGetSingleProject($MR->hostID, $MR->sourceProject); - $isDeveloper = $this->scm->checkUserAccess($MR->hostID, 0, $sourceProject, $groupIDList, 'developer'); + $sourceProject = $this->$scm->apiGetSingleProject($MR->hostID, $MR->sourceProject); + $isDeveloper = $this->$scm->checkUserAccess($MR->hostID, 0, $sourceProject, $groupIDList, 'developer'); if(!isset($gitUsers[$this->app->user->account]) or !$isDeveloper) return print(js::alert($this->lang->mr->errorLang[3]) . js::locate($this->createLink('mr', 'browse'))); }