From d755d183d9c62da44ee89b818e211c5a5efbfa7a Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 18 Jun 2024 19:42:48 +0800 Subject: [PATCH] * [task#120961,doing,0.2h] adjust repo check for repo branch btn. --- module/bug/ui/view.html.php | 3 ++- module/story/ui/view.html.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/module/bug/ui/view.html.php b/module/bug/ui/view.html.php index f617bc33f4..51c0dbcea3 100644 --- a/module/bug/ui/view.html.php +++ b/module/bug/ui/view.html.php @@ -60,7 +60,8 @@ if(!$bug->deleted) $actions = $operateList['mainActions']; if(!empty($operateList['suffixActions'])) $actions = array_merge($actions, array(array('type' => 'divider')), $operateList['suffixActions']); - $hasRepo = $this->loadModel('repo')->getListByProduct($bug->product, 'Gitlab,Gitea,Gogs,GitFox', 1); + $this->loadModel('repo'); + $hasRepo = $this->repo->getListByProduct($bug->product, implode(',', $config->repo->gitServiceTypeList), 1); $isExecutionTab = $app->tab == 'execution'; foreach($actions as $key => $action) { diff --git a/module/story/ui/view.html.php b/module/story/ui/view.html.php index 1cd46a9583..731475a06b 100644 --- a/module/story/ui/view.html.php +++ b/module/story/ui/view.html.php @@ -178,7 +178,8 @@ $versionBtn = count($versions) > 1 ? to::title(dropdown if($isInModal) $config->story->actionList['recall']['url'] = str_replace('&from=view&', '&from=modal&', $config->story->actionList['recall']['url']); if($story->status == 'changing') $config->story->actionList['recall']['text'] = $lang->story->recallChange; -$hasRepo = $this->loadModel('repo')->getListByProduct($story->product, 'Gitlab,Gitea,Gogs,GitFox', 1); +$this->loadModel('repo'); +$hasRepo = $this->repo->getListByProduct($story->product, implode(',', $config->repo->gitServiceTypeList), 1); $actions = $story->deleted ? array() : $this->loadModel('common')->buildOperateMenu($story); $hasDivider = !empty($actions['mainActions']) && !empty($actions['suffixActions']); if(!empty($actions)) $actions = array_merge($actions['mainActions'], array(array('type' => 'divider')), $actions['suffixActions']);