From 3591568b9bc8db395dbc73d5cc16b7dd03d389c6 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Thu, 25 Jul 2024 17:22:36 +0800 Subject: [PATCH] * [bug#53093] adjust git service check for actions. --- module/git/control.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/git/control.php b/module/git/control.php index a5e44dca1b..9b770518a9 100644 --- a/module/git/control.php +++ b/module/git/control.php @@ -36,8 +36,9 @@ class git extends control { if(isset($_GET['repoUrl'])) $path = $this->get->repoUrl; + $this->loadModel('repo'); $path = helper::safe64Decode($path); - $repos = $this->loadModel('repo')->getListBySCM('Git,Gitlab,Gogs,Gitea', 'haspriv'); + $repos = $this->repo->getListBySCM(implode(',', $this->config->repo->gitServiceTypeList), 'haspriv'); $currentRepo = null; foreach($repos as $repo) { @@ -77,8 +78,9 @@ class git extends control { if(isset($_GET['repoUrl'])) $path = $this->get->repoUrl; + $this->loadModel('repo'); $path = helper::safe64Decode($path); - $repos = $this->loadModel('repo')->getListBySCM('Git,Gitlab,Gogs,Gitea', 'haspriv'); + $repos = $this->repo->getListBySCM(implode(',', $this->config->repo->gitServiceTypeList), 'haspriv'); $currentRepo = null; foreach($repos as $repo) {