From 25af1d95169fc614c63d094e86a18a9b710ccfb2 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 11 May 2021 10:49:49 +0800 Subject: [PATCH] * adjust for upgrade. --- db/update15.0.rc3.sql | 3 +++ module/bug/lang/zh-tw.php | 1 + module/testtask/lang/zh-tw.php | 2 +- module/upgrade/control.php | 21 ++++++++++++++++----- module/upgrade/lang/en.php | 1 + module/upgrade/lang/zh-cn.php | 1 + module/upgrade/lang/zh-tw.php | 5 ++++- module/upgrade/view/to15guide.html.php | 11 ++++++++--- 8 files changed, 35 insertions(+), 10 deletions(-) diff --git a/db/update15.0.rc3.sql b/db/update15.0.rc3.sql index 48a9297a65..8185fd6600 100644 --- a/db/update15.0.rc3.sql +++ b/db/update15.0.rc3.sql @@ -3,3 +3,6 @@ ALTER TABLE `zt_webhook` CHANGE `executions` `executions` text NOT NULL; ALTER TABLE `zt_projectcase` ADD `count` mediumint(8) unsigned NOT NULL DEFAULT '1' AFTER `case`; ALTER TABLE `zt_repo` ADD `extra` char(30) COLLATE 'utf8_general_ci' NOT NULL AFTER `desc`; + +UPDATE `zt_config` set `value`='program-browse' where `key`='programLink' and `value`='program-pgmbrowse'; +UPDATE `zt_config` set `value`='project-browse' where `key`='projectLink' and `value`='program-prjbrowse'; diff --git a/module/bug/lang/zh-tw.php b/module/bug/lang/zh-tw.php index 4ebaa6e6f8..1d4da479e7 100644 --- a/module/bug/lang/zh-tw.php +++ b/module/bug/lang/zh-tw.php @@ -160,6 +160,7 @@ $lang->bug->createBuild = '創建'; /* legend列表。*/ $lang->bug->legendBasicInfo = '基本信息'; $lang->bug->legendAttatch = '附件'; +$lang->bug->legendPRJExecStoryTask = "項目/" . $lang->executionCommon . "/{$lang->SRCommon}/任務"; $lang->bug->legendExecStoryTask = $lang->executionCommon . "/{$lang->SRCommon}/任務"; $lang->bug->lblTypeAndSeverity = '類型/嚴重程度'; $lang->bug->lblSystemBrowserAndHardware = '系統/瀏覽器'; diff --git a/module/testtask/lang/zh-tw.php b/module/testtask/lang/zh-tw.php index f60b4faf3f..d33811642e 100644 --- a/module/testtask/lang/zh-tw.php +++ b/module/testtask/lang/zh-tw.php @@ -61,7 +61,7 @@ $lang->testtask->id = '編號'; $lang->testtask->common = '測試單'; $lang->testtask->product = '所屬' . $lang->productCommon; $lang->testtask->project = '所屬項目'; -$lang->testtask->execution = '所屬' . $lang->executionCommon; +$lang->testtask->execution = '所屬' . $lang->execution->common; $lang->testtask->build = '版本'; $lang->testtask->owner = '負責人'; $lang->testtask->executor = '執行人'; diff --git a/module/upgrade/control.php b/module/upgrade/control.php index 9a4b1922d0..cb11c1b634 100644 --- a/module/upgrade/control.php +++ b/module/upgrade/control.php @@ -23,7 +23,8 @@ class upgrade extends control $upgradeFile = $this->app->wwwRoot . 'upgrade.php'; if(!file_exists($upgradeFile)) $this->locate($this->createLink('my', 'index')); - if(!$this->config->systemMode && !isset($this->config->qcVersion)) + $systemMode = $this->loadModel('setting')->getItem('owner=system&module=common§ion=global&key=mode'); + if(empty($systemMode) && !isset($this->config->qcVersion)) { /* Judge upgrade step. */ $upgradeStep = $this->loadModel('setting')->getItem('owner=system&module=common§ion=global&key=upgradeStep'); @@ -134,7 +135,12 @@ class upgrade extends control if(!$this->upgrade->isError()) { - if(!$this->config->systemMode && !isset($this->config->qcVersion) && strpos($fromVersion, 'max') === false) $this->locate(inlink('to15Guide', "fromVersion=$fromVersion")); + $systemMode = $this->loadModel('setting')->getItem('owner=system&module=common§ion=global&key=mode'); + if((empty($systemMode) && !isset($this->config->qcVersion) && strpos($fromVersion, 'max') === false) or + ($systemMode != 'new' && strpos($fromVersion, 'max') === false && strpos($this->config->version, 'max') !== false)) + { + $this->locate(inlink('to15Guide', "fromVersion=$fromVersion")); + } $this->locate(inlink('afterExec', "fromVersion=$fromVersion")); } @@ -161,14 +167,19 @@ class upgrade extends control if($mode == 'new') $this->locate(inlink('mergeTips')); } - if(isset($this->config->bizVersion)) + if(isset($this->config->maxVersion)) { - $this->lang->upgrade->to15Desc = str_replace('15', '5', $this->lang->upgrade->to15Desc); + $this->lang->upgrade->to15Desc = str_replace('15', 'Max2', $this->lang->upgrade->to15Desc); + $title = $this->lang->upgrade->toMAXGuide; + } + elseif(isset($this->config->bizVersion)) + { + $this->lang->upgrade->to15Desc = str_replace('15', 'Biz5', $this->lang->upgrade->to15Desc); $title = $this->lang->upgrade->toBIZ5Guide; } elseif(isset($this->config->proVersion)) { - $this->lang->upgrade->to15Desc = str_replace('15', '10', $this->lang->upgrade->to15Desc); + $this->lang->upgrade->to15Desc = str_replace('15', 'Pro10', $this->lang->upgrade->to15Desc); $title = $this->lang->upgrade->toPRO10Guide; } else diff --git a/module/upgrade/lang/en.php b/module/upgrade/lang/en.php index 27aeac70be..fc1a31fbeb 100644 --- a/module/upgrade/lang/en.php +++ b/module/upgrade/lang/en.php @@ -56,6 +56,7 @@ $lang->upgrade->mergeTips = 'Data Migration Tips'; $lang->upgrade->toPMS15Guide = 'ZenTao open source version 15.0.beta1 upgrade'; $lang->upgrade->toPRO10Guide = 'ZenTao profession version 10.0.rc1 upgrade'; $lang->upgrade->toBIZ5Guide = 'ZenTao enterprise version 5.0.rc1 upgrade'; +$lang->upgrade->toMAX5Guide = 'ZenTao ultimate version upgrade'; $lang->upgrade->to15Desc = <<Dear users, ZenTao has made adjustments to navigation and concepts since version 15. The main changes are as follows:

    diff --git a/module/upgrade/lang/zh-cn.php b/module/upgrade/lang/zh-cn.php index c7f7733811..e88c5d8b49 100644 --- a/module/upgrade/lang/zh-cn.php +++ b/module/upgrade/lang/zh-cn.php @@ -56,6 +56,7 @@ $lang->upgrade->mergeTips = '数据迁移提示'; $lang->upgrade->toPMS15Guide = '禅道开源版15版本升级'; $lang->upgrade->toPRO10Guide = '禅道专业版10版本升级'; $lang->upgrade->toBIZ5Guide = '禅道企业版5版本升级'; +$lang->upgrade->toMAXGuide = '禅道旗舰版版本升级'; $lang->upgrade->to15Desc = <<尊敬的用户,禅道从15版本开始对导航和概念做了调整,主要改动如下:

      diff --git a/module/upgrade/lang/zh-tw.php b/module/upgrade/lang/zh-tw.php index 42a3338775..8957beab51 100644 --- a/module/upgrade/lang/zh-tw.php +++ b/module/upgrade/lang/zh-tw.php @@ -53,7 +53,10 @@ $lang->upgrade->noticeSQL = '檢查到你的資料庫跟標準不一致, $lang->upgrade->afterDeleted = '以上檔案未能刪除, 刪除後刷新!'; $lang->upgrade->mergeProgram = '數據遷移'; $lang->upgrade->mergeTips = '數據遷移提示'; -$lang->upgrade->to15Guide = '禪道開源版15版本升級'; +$lang->upgrade->toPMS15Guide = '禪道開源版15版本升級'; +$lang->upgrade->toPRO10Guide = '禪道專業版10版本升級'; +$lang->upgrade->toBIZ5Guide = '禪道企業版5版本升級'; +$lang->upgrade->toMAXGuide = '禪道旗艦版版本升級'; $lang->upgrade->to15Desc = <<尊敬的用戶,禪道從15版本開始對導航和概念做了調整,主要改動如下:

        diff --git a/module/upgrade/view/to15guide.html.php b/module/upgrade/view/to15guide.html.php index b1bac17b6c..51e644ab63 100644 --- a/module/upgrade/view/to15guide.html.php +++ b/module/upgrade/view/to15guide.html.php @@ -16,7 +16,11 @@
        bizVersion)) + if(isset($config->maxVersion)) + { + echo $lang->upgrade->toMAXGuide; + } + elseif(isset($config->bizVersion)) { echo $lang->upgrade->toBIZ5Guide; } @@ -33,9 +37,10 @@
        upgrade->to15Desc;?> - upgrade->to15Mode, 'classic');?> + upgrade->to15Mode['classic']) ? 'classic' : 'new');?> + upgrade->to15Mode, $systemMode);?>

        -
        upgrade->selectedModeTips['classic'];?>
        +
        upgrade->selectedModeTips[$systemMode];?>