Merge branch 'liyuchun_fixbug' into 'zenops_38'

Liyuchun fixbug

See merge request easycorp/zentaopms!4578
This commit is contained in:
孙广明
2022-07-15 06:06:18 +00:00
11 changed files with 20 additions and 7 deletions
+1
View File
@@ -377,6 +377,7 @@ $config->objectTables['gitlab'] = TABLE_PIPELINE;
$config->objectTables['jebkins'] = TABLE_PIPELINE;
$config->objectTables['stage'] = TABLE_STAGE;
$config->objectTables['apistruct'] = TABLE_APISTRUCT;
$config->objectTables['repo'] = TABLE_REPO;
$config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme', 'visions');
+2 -1
View File
@@ -46,6 +46,7 @@ $config->action->objectNameFields['gitlab'] = 'name';
$config->action->objectNameFields['gitea'] = 'name';
$config->action->objectNameFields['stage'] = 'name';
$config->action->objectNameFields['apistruct'] = 'name';
$config->action->objectNameFields['repo'] = 'name';
$config->action->commonImgSize = 870;
@@ -61,7 +62,7 @@ $config->action->majorList['execution'] = array('opened', 'edited');
$config->action->needGetProjectType = 'build,task,bug,case,testcase,caselib,testtask,testsuite,testreport,doc,issue,release,risk,design,opportunity,trainplan,gapanalysis,researchplan,researchreport,';
$config->action->needGetRelateField = ',story,productplan,release,task,build,bug,testcase,case,testtask,testreport,doc,doclib,issue,risk,opportunity,trainplan,gapanalysis,team,whitelist,researchplan,researchreport,meeting,kanbanlane,kanbancolumn,module,';
$config->action->noLinkModules = ',doclib,module,webhook,gitlab,gitea,sonarqube,pipeline,jenkins,kanban,kanbanspace,kanbancolumn,kanbanlane,kanbanregion,kanbancard,execution,project,traincategory,apistruct,program,product,user,entry,';
$config->action->noLinkModules = ',doclib,module,webhook,gitlab,gitea,sonarqube,pipeline,jenkins,kanban,kanbanspace,kanbancolumn,kanbanlane,kanbanregion,kanbancard,execution,project,traincategory,apistruct,program,product,user,entry,repo,';
$config->action->preferredTypeNum = 10;
+1
View File
@@ -144,6 +144,7 @@ $lang->action->objectTypes['sonarqube'] = 'SonarQube Server';
$lang->action->objectTypes['sonarqubeproject'] = 'SonarQube Project';
$lang->action->objectTypes['stage'] = 'Stage';
$lang->action->objectTypes['patch'] = 'Patch';
$lang->action->objectTypes['repo'] = 'Repo';
/* Used to describe operation history. */
$lang->action->desc = new stdclass();
+1
View File
@@ -144,6 +144,7 @@ $lang->action->objectTypes['sonarqube'] = 'SonarQube Server';
$lang->action->objectTypes['sonarqubeproject'] = 'SonarQube Project';
$lang->action->objectTypes['stage'] = 'Stage';
$lang->action->objectTypes['patch'] = 'Patch';
$lang->action->objectTypes['repo'] = 'Repo';
/* Used to describe operation history. */
$lang->action->desc = new stdclass();
+1
View File
@@ -144,6 +144,7 @@ $lang->action->objectTypes['sonarqube'] = 'SonarQube Server';
$lang->action->objectTypes['sonarqubeproject'] = 'SonarQube Project';
$lang->action->objectTypes['stage'] = 'Stage';
$lang->action->objectTypes['patch'] = 'Patch';
$lang->action->objectTypes['repo'] = 'Repo';
/* Used to describe operation history. */
$lang->action->desc = new stdclass();
+1
View File
@@ -122,6 +122,7 @@ $lang->action->objectTypes['sonarqube'] = 'SonarQube Server';
$lang->action->objectTypes['sonarqubeproject'] = 'SonarQube Project';
$lang->action->objectTypes['stage'] = 'Stage';
$lang->action->objectTypes['patch'] = 'Patch';
$lang->action->objectTypes['repo'] = 'Repo';
/* Used to describe operation history. */
$lang->action->desc = new stdclass();
+1
View File
@@ -144,6 +144,7 @@ $lang->action->objectTypes['sonarqube'] = 'SonarQube服务器';
$lang->action->objectTypes['sonarqubeproject'] = 'SonarQube项目';
$lang->action->objectTypes['stage'] = '阶段';
$lang->action->objectTypes['patch'] = '补丁';
$lang->action->objectTypes['repo'] = '代码库';
/* 用来描述操作历史记录。*/
$lang->action->desc = new stdclass();
+1
View File
@@ -134,6 +134,7 @@ $lang->action->objectTypes['kanbanregion'] = '看板區域';
$lang->action->objectTypes['kanbanlane'] = '看板泳道';
$lang->action->objectTypes['kanbancolumn'] = '看板列';
$lang->action->objectTypes['kanbancard'] = '看板卡片';
$lang->action->objectTypes['repo'] = '代码库';
/* 用來描述操作歷史記錄。*/
$lang->action->desc = new stdclass();
+7 -1
View File
@@ -26,7 +26,13 @@ class ciModel extends model
}
common::setMenuVars('devops', $this->session->repoID);
$this->lang->switcherMenu = $this->loadModel('repo')->getSwitcher($this->session->repoID);
if($this->session->repoID)
{
$repo = $this->loadModel('repo')->getRepoByID($repoID);
if($repo->SCM != 'Gitlab') unset($this->lang->devops->menu->mr);
$this->lang->switcherMenu = $this->loadModel('repo')->getSwitcher($this->session->repoID);
}
}
/**
+1 -5
View File
@@ -237,11 +237,7 @@ class repo extends control
if($error) return print(js::alert($error));
$this->dao->delete()->from(TABLE_REPO)->where('id')->eq($repoID)->exec();
$this->dao->delete()->from(TABLE_REPOHISTORY)->where('repo')->eq($repoID)->exec();
$this->dao->delete()->from(TABLE_REPOFILES)->where('repo')->eq($repoID)->exec();
$this->dao->delete()->from(TABLE_REPOBRANCH)->where('repo')->eq($repoID)->exec();
$this->repo->delete(TABLE_REPO, $repoID);
if(dao::isError()) return print(js::error(dao::getError()));
echo js::reload('parent');
}
+3
View File
@@ -38,6 +38,9 @@ class repoModel extends model
if(empty($repoID)) $repoID = $this->session->repoID ? $this->session->repoID : key($repos);
if(!isset($repos[$repoID])) $repoID = key($repos);
/* Init switcher menu. */
$this->lang->switcherMenu = '';
/* Check the privilege. */
if($repoID)
{