diff --git a/config/config.php b/config/config.php index 5832892fe4..0af47c222b 100644 --- a/config/config.php +++ b/config/config.php @@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}} if(!function_exists('getWebRoot')){function getWebRoot(){}} /* 基本设置。Basic settings. */ -$config->version = '16.4'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. +$config->version = '16.5'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. $config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP. $config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time. $config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php. diff --git a/module/misc/lang/en.php b/module/misc/lang/en.php index 77ce3e480b..9d3f90dd7a 100644 --- a/module/misc/lang/en.php +++ b/module/misc/lang/en.php @@ -94,6 +94,7 @@ $lang->misc->feature->downloadFile = 'Download introduction'; $lang->misc->feature->tutorialDesc = '
ZenTao 15.0 has new functions, and you know how to use it through the "Tutorial".
Click your [Avatar-Theme-Young Blue] to set it.
'; $lang->misc->feature->themeDesc = 'ZenTao 15.0+ a new "Youth Blue" theme, the pages are more beautiful and the experience is more friendly.
Click your [Avatar-Theme-Young Blue] to set it.
'; +$lang->misc->releaseDate['16.5'] = '2022-02-22'; $lang->misc->releaseDate['16.4'] = '2022-02-15'; $lang->misc->releaseDate['16.3'] = '2022-01-26'; $lang->misc->releaseDate['16.2'] = '2022-01-17'; @@ -168,6 +169,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22'; $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; +$lang->misc->feature->all['16.5'][] = array('title' => 'Fix bug, merge all code to one package', 'desc' => ''); $lang->misc->feature->all['16.4'][] = array('title' => 'Implement JIRA import function and improve plug-in extension mechanism.', 'desc' => ''); $lang->misc->feature->all['16.3'][] = array('title' => 'Kanban adds related plan/release/version/iteration functions, and the detail experience is optimized, fix bugs.', 'desc' => ''); $lang->misc->feature->all['16.2'][] = array('title' => 'Add kanban model project, fix bugs.', 'desc' => ''); diff --git a/module/misc/lang/zh-cn.php b/module/misc/lang/zh-cn.php index 3341512918..8180645d27 100644 --- a/module/misc/lang/zh-cn.php +++ b/module/misc/lang/zh-cn.php @@ -94,6 +94,7 @@ $lang->misc->feature->downloadFile = '下载新版本功能介绍文档'; $lang->misc->feature->tutorialDesc = "禅道15系列新增了多项功能,您可以通过“新手引导教程”快速了解禅道的基本使用方法。
通过鼠标经过 [头像-新手引导],点击新手引导,即可进入新手引导教程。
"; $lang->misc->feature->themeDesc = "禅道15系列上线了全新的“青春蓝”主题,页面呈现更加美观,体验更加友好。
通过鼠标经过 [头像-主题-青春蓝],点击青春蓝,即可设置成功。
"; +$lang->misc->releaseDate['16.5'] = '2022-02-22'; $lang->misc->releaseDate['16.4'] = '2022-02-15'; $lang->misc->releaseDate['16.3'] = '2022-01-26'; $lang->misc->releaseDate['16.2'] = '2022-01-17'; @@ -168,6 +169,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22'; $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; +$lang->misc->feature->all['16.5'][] = array('title' => '实现一码多面,多个禅道版本集成到一个包中。', 'desc' => ''); $lang->misc->feature->all['16.4'][] = array('title' => '实现JIRA导入功能,完善插件扩展机制。', 'desc' => ''); $lang->misc->feature->all['16.3'][] = array('title' => '看板增加关联计划/发布/版本/迭代功能,细节体验优化。', 'desc' => ''); $lang->misc->feature->all['16.2'][] = array('title' => '新增专业研发看板,可以创建看板模型项目,修复Bug。', 'desc' => ''); diff --git a/module/report/model.php b/module/report/model.php index f5377e35a3..0badfbb7d6 100644 --- a/module/report/model.php +++ b/module/report/model.php @@ -390,6 +390,7 @@ class reportModel extends model $workload[$user]['total']['count'] = isset($workload[$user]['total']['count']) ? $workload[$user]['total']['count'] + 1 : 1; $workload[$user]['total']['manhour'] = isset($workload[$user]['total']['manhour']) ? $workload[$user]['total']['manhour'] + $task->left : $task->left; } + $workload[$user]['task']['project'] = $project; } } diff --git a/module/upgrade/config.php b/module/upgrade/config.php index 33621d5718..bf1b7baff3 100644 --- a/module/upgrade/config.php +++ b/module/upgrade/config.php @@ -1,4 +1,171 @@ maxVersion = array(); +$config->maxVersion['max2_0_rc1'] = '15_0_rc3'; +$config->maxVersion['max2_0'] = '15_0'; +$config->maxVersion['max2_1'] = '15_3'; +$config->maxVersion['max2_2'] = '15_5'; +$config->maxVersion['max2_3'] = '15_7'; +$config->maxVersion['max2_3_1'] = '15_7_1'; +$config->maxVersion['max2_4_beta1'] = '16_0_beta1'; +$config->maxVersion['max2_4'] = '16_0'; +$config->maxVersion['max2_5'] = '16_1'; +$config->maxVersion['max2_6'] = '16_2'; +$config->maxVersion['max2_7'] = '16_3'; +$config->maxVersion['max2_8'] = '16_4'; + +$config->bizVersion = array(); +$config->bizVersion['biz1_0'] = '9_5_1'; +$config->bizVersion['biz1_1'] = '9_6_3'; +$config->bizVersion['biz1_1_1'] = '9_8'; +$config->bizVersion['biz1_1_2'] = '9_8_1'; +$config->bizVersion['biz1_1_3'] = '9_8_2'; +$config->bizVersion['biz1_1_4'] = '9_8_3'; +$config->bizVersion['biz2_0_beta'] = '10_0'; +$config->bizVersion['biz2_1'] = '10_3'; +$config->bizVersion['biz2_2'] = '10_4'; +$config->bizVersion['biz2_3'] = '10_5'; +$config->bizVersion['biz2_3_1'] = '10_6'; +$config->bizVersion['biz2_4'] = '10_6'; +$config->bizVersion['biz3_0'] = '11_1'; +$config->bizVersion['biz3_1'] = '11_2'; +$config->bizVersion['biz3_2'] = '11_3'; +$config->bizVersion['biz3_2_1'] = '11_4_1'; +$config->bizVersion['biz3_3'] = '11_5'; +$config->bizVersion['biz3_4'] = '11_6'; +$config->bizVersion['biz3_5_alpha'] = '11_6'; +$config->bizVersion['biz3_5_beta'] = '11_6_1'; +$config->bizVersion['biz3_5'] = '11_6_5'; +$config->bizVersion['biz3_5_1'] = '11_7'; +$config->bizVersion['biz3_6'] = '12_0'; +$config->bizVersion['biz3_6_1'] = '12_0_1'; +$config->bizVersion['biz3_7'] = '12_2'; +$config->bizVersion['biz3_7_1'] = '12_3_2'; +$config->bizVersion['biz3_7_2'] = '12_3_3'; +$config->bizVersion['biz4_0'] = '12_4'; +$config->bizVersion['biz4_0_1'] = '12_4_1'; +$config->bizVersion['biz4_0_2'] = '12_4_2'; +$config->bizVersion['biz4_0_3'] = '12_4_3'; +$config->bizVersion['biz4_0_4'] = '12_4_4'; +$config->bizVersion['biz4_1'] = '12_5'; +$config->bizVersion['biz4_1_1'] = '12_5_1'; +$config->bizVersion['biz4_1_2'] = '12_5_2'; +$config->bizVersion['biz4_1_3'] = '12_5_3'; +$config->bizVersion['biz5_0_rc1'] = '15_0_rc3'; +$config->bizVersion['biz5_0'] = '15_0'; +$config->bizVersion['biz5_0_1'] = '15_0_3'; +$config->bizVersion['biz5_1'] = '15_3'; +$config->bizVersion['biz5_2'] = '15_5'; +$config->bizVersion['biz5_3'] = '15_7'; +$config->bizVersion['biz5_3_1'] = '15_7_1'; +$config->bizVersion['biz6_0_beta1'] = '16_0_beta1'; +$config->bizVersion['biz6_0'] = '16_0'; +$config->bizVersion['biz6_1'] = '16_1'; +$config->bizVersion['biz6_2'] = '16_2'; +$config->bizVersion['biz6_3'] = '16_3'; +$config->bizVersion['biz6_4'] = '16_4'; + +$config->proVersion = array(); +$config->proVersion['pro1_0'] = '3_1'; +$config->proVersion['pro1_1'] = '3_2'; +$config->proVersion['pro1_1_1'] = '3_2_1'; +$config->proVersion['pro1_2'] = '3_3'; +$config->proVersion['pro1_3'] = '3_3'; +$config->proVersion['pro2_0'] = '4_0'; +$config->proVersion['pro2_0_1'] = '4_0_1'; +$config->proVersion['pro2_1'] = '4_1'; +$config->proVersion['pro2_2_beta'] = '4_2_beta'; +$config->proVersion['pro2_3_beta'] = '4_3_beta'; +$config->proVersion['pro3_0_beta1'] = '5_0_beta1'; +$config->proVersion['pro3_0_beta1'] = '5_0_beta2'; +$config->proVersion['pro3_0'] = '5_0'; +$config->proVersion['pro3_1'] = '5_1'; +$config->proVersion['pro3_2'] = '5_2'; +$config->proVersion['pro3_2_1'] = '5_2_1'; +$config->proVersion['pro3_3'] = '5_3'; +$config->proVersion['pro4_0_beta1'] = '6_0'; +$config->proVersion['pro4_0'] = '6_1'; +$config->proVersion['pro4_1_beta'] = '6_2'; +$config->proVersion['pro4_2'] = '6_3'; +$config->proVersion['pro4_3'] = '6_3'; +$config->proVersion['pro4_4'] = '7_0'; +$config->proVersion['pro4_5'] = '7_1'; +$config->proVersion['pro4_6'] = '7_2_4'; +$config->proVersion['pro4_7'] = '7_2_5'; +$config->proVersion['pro4_7_1'] = '7_3'; +$config->proVersion['pro5_0'] = '8_0'; +$config->proVersion['pro5_0_1'] = '8_0_1'; +$config->proVersion['pro5_1'] = '8_1'; +$config->proVersion['pro5_1_3'] = '8_1_3'; +$config->proVersion['pro5_2'] = '8_2'; +$config->proVersion['pro5_2_1'] = '8_2_1'; +$config->proVersion['pro5_3'] = '8_2_3'; +$config->proVersion['pro5_3_1'] = '8_2_4'; +$config->proVersion['pro5_3_2'] = '8_2_5'; +$config->proVersion['pro5_3_3'] = '8_2_6'; +$config->proVersion['pro5_4'] = '8_3'; +$config->proVersion['pro5_4_1'] = '8_3_1'; +$config->proVersion['pro5_5'] = '8_4'; +$config->proVersion['pro5_5_1'] = '8_4_1'; +$config->proVersion['pro6_0_beta'] = '9_0_beta'; +$config->proVersion['pro6_0'] = '9_0'; +$config->proVersion['pro6_0_1'] = '9_0_1'; +$config->proVersion['pro6_1'] = '9_1'; +$config->proVersion['pro6_2'] = '9_1_2'; +$config->proVersion['pro6_3'] = '9_2'; +$config->proVersion['pro6_3_1'] = '9_2_1'; +$config->proVersion['pro6_4'] = '9_4'; +$config->proVersion['pro6_5'] = '9_5'; +$config->proVersion['pro6_5_1'] = '9_5_1'; +$config->proVersion['pro6_6'] = '9_6_3'; +$config->proVersion['pro6_6_1'] = '9_7'; +$config->proVersion['pro6_7'] = '9_8'; +$config->proVersion['pro6_7_1'] = '9_8_1'; +$config->proVersion['pro6_7_2'] = '9_8_2'; +$config->proVersion['pro6_7_3'] = '9_8_3'; +$config->proVersion['pro7_0_beta'] = '10_0'; +$config->proVersion['pro7_1'] = '10_1'; +$config->proVersion['pro7_2'] = '10_3'; +$config->proVersion['pro7_3'] = '10_4'; +$config->proVersion['pro7_4'] = '10_5'; +$config->proVersion['pro7_5'] = '10_5_1'; +$config->proVersion['pro7_5_1'] = '10_6'; +$config->proVersion['pro8_0'] = '11_1'; +$config->proVersion['pro8_1'] = '11_2'; +$config->proVersion['pro8_2'] = '11_3'; +$config->proVersion['pro8_3'] = '11_4_1'; +$config->proVersion['pro8_3_1'] = '11_4_1'; +$config->proVersion['pro8_4'] = '11_5'; +$config->proVersion['pro8_5'] = '11_6'; +$config->proVersion['pro8_5_1'] = '11_6_1'; +$config->proVersion['pro8_5_2'] = '11_6_3'; +$config->proVersion['pro8_5_3'] = '11_6_5'; +$config->proVersion['pro8_6'] = '11_7'; +$config->proVersion['pro8_7'] = '12_0'; +$config->proVersion['pro8_7_1'] = '12_0_1'; +$config->proVersion['pro8_8'] = '12_2'; +$config->proVersion['pro8_8_1'] = '12_3_1'; +$config->proVersion['pro8_8_2'] = '12_3_2'; +$config->proVersion['pro8_8_3'] = '12_3_3'; +$config->proVersion['pro8_9'] = '12_4'; +$config->proVersion['pro8_9_1'] = '12_4_1'; +$config->proVersion['pro8_9_2'] = '12_4_2'; +$config->proVersion['pro8_9_3'] = '12_4_3'; +$config->proVersion['pro8_9_4'] = '12_4_4'; +$config->proVersion['pro9_0'] = '12_5'; +$config->proVersion['pro9_0_1'] = '12_5_1'; +$config->proVersion['pro9_0_2'] = '12_5_2'; +$config->proVersion['pro9_0_3'] = '12_5_3'; +$config->proVersion['pro10_0_rc1'] = '15_0_rc3'; +$config->proVersion['pro10_0'] = '15_0'; +$config->proVersion['pro10_0_1'] = '15_0_2'; +$config->proVersion['pro10_0_2'] = '15_0_3'; +$config->proVersion['pro10_1'] = '15_3'; +$config->proVersion['pro10_2'] = '15_5'; +$config->proVersion['pro10_3'] = '15_7'; +$config->proVersion['pro10_3_1'] = '15_7_1'; +$config->proVersion['pro11_0_beta1'] = '16_0_beta1'; +$config->proVersion['pro11_0'] = '16_0'; + $config->upgrade = new stdclass(); $config->upgrade->lowerTables = array(); $config->upgrade->lowerTables[$config->db->prefix . 'caseStep'] = $config->db->prefix . 'casestep'; diff --git a/module/upgrade/lang/version.php b/module/upgrade/lang/version.php index 2a6a6a4447..26afc07ee1 100644 --- a/module/upgrade/lang/version.php +++ b/module/upgrade/lang/version.php @@ -1,4 +1,5 @@ upgrade->fromVersions['0_3beta'] = '0.3 BETA'; $lang->upgrade->fromVersions['0_4beta'] = '0.4 BETA'; $lang->upgrade->fromVersions['0_5beta'] = '0.5 BETA'; @@ -152,3 +153,169 @@ $lang->upgrade->fromVersions['16_0'] = '16.0'; $lang->upgrade->fromVersions['16_1'] = '16.1'; $lang->upgrade->fromVersions['16_2'] = '16.2'; $lang->upgrade->fromVersions['16_3'] = '16.3'; +$lang->upgrade->fromVersions['16_4'] = '16.4'; + +/* Pro. */ +$lang->upgrade->fromVersions['pro1_0'] = 'Pro1.0'; +$lang->upgrade->fromVersions['pro1_1'] = 'Pro1.1'; +$lang->upgrade->fromVersions['pro1_1_1'] = 'Pro1.1.1'; +$lang->upgrade->fromVersions['pro1_2'] = 'Pro1.2'; +$lang->upgrade->fromVersions['pro1_3'] = 'Pro1.3'; +$lang->upgrade->fromVersions['pro2_0'] = 'Pro2.0'; +$lang->upgrade->fromVersions['pro2_0_1'] = 'Pro2.0.1'; +$lang->upgrade->fromVersions['pro2_1'] = 'Pro2.1'; +$lang->upgrade->fromVersions['pro2_2_beta'] = 'Pro2.2.beta'; +$lang->upgrade->fromVersions['pro2_3_beta'] = 'Pro2.3.beta'; +$lang->upgrade->fromVersions['pro3_0_beta1'] = 'Pro3.0.beta1'; +$lang->upgrade->fromVersions['pro3_0'] = 'Pro3.0'; +$lang->upgrade->fromVersions['pro3_1'] = 'Pro3.1'; +$lang->upgrade->fromVersions['pro3_2'] = 'Pro3.2'; +$lang->upgrade->fromVersions['pro3_2_1'] = 'Pro3.2.1'; +$lang->upgrade->fromVersions['pro3_3'] = 'Pro3.3'; +$lang->upgrade->fromVersions['pro4_0_beta1'] = 'Pro4.0.beta1'; +$lang->upgrade->fromVersions['pro4_0'] = 'Pro4.0'; +$lang->upgrade->fromVersions['pro4_1_beta'] = 'Pro4.1.beta'; +$lang->upgrade->fromVersions['pro4_2'] = 'Pro4.2'; +$lang->upgrade->fromVersions['pro4_3'] = 'Pro4.3'; +$lang->upgrade->fromVersions['pro4_4'] = 'Pro4.4'; +$lang->upgrade->fromVersions['pro4_5'] = 'Pro4.5'; +$lang->upgrade->fromVersions['pro4_6'] = 'Pro4.6'; +$lang->upgrade->fromVersions['pro4_7'] = 'Pro4.7'; +$lang->upgrade->fromVersions['pro4_7_1'] = 'Pro4.7.1'; +$lang->upgrade->fromVersions['pro5_0'] = 'Pro5.0'; +$lang->upgrade->fromVersions['pro5_0_1'] = 'Pro5.0.1'; +$lang->upgrade->fromVersions['pro5_1'] = 'Pro5.1'; +$lang->upgrade->fromVersions['pro5_1_3'] = 'Pro5.1.3'; +$lang->upgrade->fromVersions['pro5_2'] = 'Pro5.2'; +$lang->upgrade->fromVersions['pro5_2_1'] = 'Pro5.2.1'; +$lang->upgrade->fromVersions['pro5_3'] = 'Pro5.3'; +$lang->upgrade->fromVersions['pro5_3_1'] = 'Pro5.3.1'; +$lang->upgrade->fromVersions['pro5_3_2'] = 'Pro5.3.2'; +$lang->upgrade->fromVersions['pro5_3_3'] = 'Pro5.3.3'; +$lang->upgrade->fromVersions['pro5_4'] = 'Pro5.4'; +$lang->upgrade->fromVersions['pro5_4_1'] = 'Pro5.4.1'; +$lang->upgrade->fromVersions['pro5_5'] = 'Pro5.5'; +$lang->upgrade->fromVersions['pro5_5_1'] = 'Pro5.5.1'; +$lang->upgrade->fromVersions['pro6_0_beta'] = 'Pro6.0.beta'; +$lang->upgrade->fromVersions['pro6_0'] = 'Pro6.0'; +$lang->upgrade->fromVersions['pro6_0_1'] = 'Pro6.0.1'; +$lang->upgrade->fromVersions['pro6_1'] = 'Pro6.1'; +$lang->upgrade->fromVersions['pro6_2'] = 'Pro6.2'; +$lang->upgrade->fromVersions['pro6_3'] = 'Pro6.3'; +$lang->upgrade->fromVersions['pro6_3_1'] = 'Pro6.3.1'; +$lang->upgrade->fromVersions['pro6_4'] = 'Pro6.4'; +$lang->upgrade->fromVersions['pro6_5'] = 'Pro6.5'; +$lang->upgrade->fromVersions['pro6_5_1'] = 'Pro6.5.1'; +$lang->upgrade->fromVersions['pro6_6'] = 'Pro6.6'; +$lang->upgrade->fromVersions['pro6_6_1'] = 'Pro6.6.1'; +$lang->upgrade->fromVersions['pro6_7'] = 'Pro6.7'; +$lang->upgrade->fromVersions['pro6_7_1'] = 'Pro6.7.1'; +$lang->upgrade->fromVersions['pro6_7_2'] = 'Pro6.7.2'; +$lang->upgrade->fromVersions['pro6_7_3'] = 'Pro6.7.3'; +$lang->upgrade->fromVersions['pro7_0_beta'] = 'Pro7.0.beta'; +$lang->upgrade->fromVersions['pro7_1'] = 'Pro7.1'; +$lang->upgrade->fromVersions['pro7_2'] = 'Pro7.2'; +$lang->upgrade->fromVersions['pro7_3'] = 'Pro7.3'; +$lang->upgrade->fromVersions['pro7_4'] = 'Pro7.4'; +$lang->upgrade->fromVersions['pro7_5'] = 'Pro7.5'; +$lang->upgrade->fromVersions['pro7_5_1'] = 'Pro7.5.1'; +$lang->upgrade->fromVersions['pro8_0'] = 'Pro8.0'; +$lang->upgrade->fromVersions['pro8_1'] = 'Pro8.1'; +$lang->upgrade->fromVersions['pro8_2'] = 'Pro8.2'; +$lang->upgrade->fromVersions['pro8_3'] = 'Pro8.3'; +$lang->upgrade->fromVersions['pro8_3_1'] = 'Pro8.3.1'; +$lang->upgrade->fromVersions['pro8_4'] = 'Pro8.4'; +$lang->upgrade->fromVersions['pro8_5'] = 'Pro8.5'; +$lang->upgrade->fromVersions['pro8_5_1'] = 'Pro8.5.1'; +$lang->upgrade->fromVersions['pro8_5_2'] = 'Pro8.5.2'; +$lang->upgrade->fromVersions['pro8_5_3'] = 'Pro8.5.3'; +$lang->upgrade->fromVersions['pro8_6'] = 'Pro8.6'; +$lang->upgrade->fromVersions['pro8_7'] = 'Pro8.7'; +$lang->upgrade->fromVersions['pro8_7_1'] = 'Pro8.7.1'; +$lang->upgrade->fromVersions['pro8_8'] = 'Pro8.8'; +$lang->upgrade->fromVersions['pro8_8_1'] = 'Pro8.8.1'; +$lang->upgrade->fromVersions['pro8_8_2'] = 'Pro8.8.2'; +$lang->upgrade->fromVersions['pro8_8_3'] = 'Pro8.8.3'; +$lang->upgrade->fromVersions['pro8_9'] = 'Pro8.9'; +$lang->upgrade->fromVersions['pro8_9_1'] = 'Pro8.9.1'; +$lang->upgrade->fromVersions['pro8_9_2'] = 'Pro8.9.2'; +$lang->upgrade->fromVersions['pro8_9_3'] = 'Pro8.9.3'; +$lang->upgrade->fromVersions['pro8_9_4'] = 'Pro8.9.4'; +$lang->upgrade->fromVersions['pro9_0'] = 'Pro9.0'; +$lang->upgrade->fromVersions['pro9_0_1'] = 'Pro9.0.1'; +$lang->upgrade->fromVersions['pro9_0_2'] = 'Pro9.0.2'; +$lang->upgrade->fromVersions['pro9_0_3'] = 'Pro9.0.3'; +$lang->upgrade->fromVersions['pro10_0_rc1'] = 'Pro10.0.rc1'; +$lang->upgrade->fromVersions['pro10_0'] = 'Pro10.0'; +$lang->upgrade->fromVersions['pro10_0_1'] = 'Pro10.0.1'; +$lang->upgrade->fromVersions['pro10_0_2'] = 'Pro10.0.2'; +$lang->upgrade->fromVersions['pro10_1'] = 'Pro10.1'; +$lang->upgrade->fromVersions['pro10_2'] = 'Pro10.2'; +$lang->upgrade->fromVersions['pro10_3'] = 'Pro10.3'; +$lang->upgrade->fromVersions['pro10_3_1'] = 'Pro10.3.1'; +$lang->upgrade->fromVersions['pro11_0_beta1'] = 'Pro11.0.beta1'; + +/* Biz. */ +$lang->upgrade->fromVersions['biz1_0'] = 'Biz1.0'; +$lang->upgrade->fromVersions['biz1_1'] = 'Biz1.1'; +$lang->upgrade->fromVersions['biz1_1_1'] = 'Biz1.1.1'; +$lang->upgrade->fromVersions['biz1_1_2'] = 'Biz1.1.2'; +$lang->upgrade->fromVersions['biz1_1_3'] = 'Biz1.1.3'; +$lang->upgrade->fromVersions['biz1_1_4'] = 'Biz1.1.4'; +$lang->upgrade->fromVersions['biz2_0_beta'] = 'Biz2.0.beta'; +$lang->upgrade->fromVersions['biz2_1'] = 'Biz2.1'; +$lang->upgrade->fromVersions['biz2_2'] = 'Biz2.2'; +$lang->upgrade->fromVersions['biz2_3'] = 'Biz2.3'; +$lang->upgrade->fromVersions['biz2_3_1'] = 'Biz2.3.1'; +$lang->upgrade->fromVersions['biz2_4'] = 'Biz2.4'; +$lang->upgrade->fromVersions['biz3_0'] = 'Biz3.0'; +$lang->upgrade->fromVersions['biz3_1'] = 'Biz3.1'; +$lang->upgrade->fromVersions['biz3_2'] = 'Biz3.2'; +$lang->upgrade->fromVersions['biz3_2_1'] = 'Biz3.2.1'; +$lang->upgrade->fromVersions['biz3_3'] = 'Biz3.3'; +$lang->upgrade->fromVersions['biz3_4'] = 'Biz3.4'; +$lang->upgrade->fromVersions['biz3_5_alpha'] = 'Biz3.5.alpha'; +$lang->upgrade->fromVersions['biz3_5_beta'] = 'Biz3.5.beta'; +$lang->upgrade->fromVersions['biz3_5'] = 'Biz3.5'; +$lang->upgrade->fromVersions['biz3_5_1'] = 'Biz3.5.1'; +$lang->upgrade->fromVersions['biz3_6'] = 'Biz3.6'; +$lang->upgrade->fromVersions['biz3_6_1'] = 'Biz3.6.1'; +$lang->upgrade->fromVersions['biz3_7'] = 'Biz3.7'; +$lang->upgrade->fromVersions['biz3_7_1'] = 'Biz3.7.1'; +$lang->upgrade->fromVersions['biz3_7_2'] = 'Biz3.7.2'; +$lang->upgrade->fromVersions['biz4_0'] = 'Biz4.0'; +$lang->upgrade->fromVersions['biz4_0_1'] = 'Biz4.0.1'; +$lang->upgrade->fromVersions['biz4_0_2'] = 'Biz4.0.2'; +$lang->upgrade->fromVersions['biz4_0_3'] = 'Biz4.0.3'; +$lang->upgrade->fromVersions['biz4_0_4'] = 'Biz4.0.4'; +$lang->upgrade->fromVersions['biz4_1'] = 'Biz4.1'; +$lang->upgrade->fromVersions['biz4_1_1'] = 'Biz4.1.1'; +$lang->upgrade->fromVersions['biz4_1_2'] = 'Biz4.1.2'; +$lang->upgrade->fromVersions['biz4_1_3'] = 'Biz4.1.3'; +$lang->upgrade->fromVersions['biz5_0_rc1'] = 'Biz5.0.rc1'; +$lang->upgrade->fromVersions['biz5_0'] = 'Biz5.0'; +$lang->upgrade->fromVersions['biz5_0_1'] = 'Biz5.0.1'; +$lang->upgrade->fromVersions['biz5_1'] = 'Biz5.1'; +$lang->upgrade->fromVersions['biz5_2'] = 'Biz5.2'; +$lang->upgrade->fromVersions['biz5_3'] = 'Biz5.3'; +$lang->upgrade->fromVersions['biz5_3_1'] = 'Biz5.3.1'; +$lang->upgrade->fromVersions['biz6_0_beta1'] = 'Biz6.0.beta1'; +$lang->upgrade->fromVersions['biz6_0'] = 'Biz6.0'; +$lang->upgrade->fromVersions['biz6_1'] = 'Biz6.1'; +$lang->upgrade->fromVersions['biz6_2'] = 'Biz6.2'; +$lang->upgrade->fromVersions['biz6_3'] = 'Biz6.3'; +$lang->upgrade->fromVersions['biz6_4'] = 'Biz6.4'; + +/* Max. */ +$lang->upgrade->fromVersions['max2_0_beta4'] = 'Max2.0.beta4'; +$lang->upgrade->fromVersions['max2_0_rc1'] = 'Max2.0.rc1'; +$lang->upgrade->fromVersions['max2_0'] = 'Max2.0'; +$lang->upgrade->fromVersions['max2_1'] = 'Max2.1'; +$lang->upgrade->fromVersions['max2_2'] = 'Max2.2'; +$lang->upgrade->fromVersions['max2_3'] = 'Max2.3'; +$lang->upgrade->fromVersions['max2_3_1'] = 'Max2.3.1'; +$lang->upgrade->fromVersions['max2_4_beta1'] = 'Max2.4.beta1'; +$lang->upgrade->fromVersions['max2_4'] = 'Max2.4'; +$lang->upgrade->fromVersions['max2_5'] = 'Max2.5'; +$lang->upgrade->fromVersions['max2_6'] = 'Max2.6'; +$lang->upgrade->fromVersions['max2_7'] = 'Max2.7'; diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 30a9000534..ec92774102 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -37,8 +37,39 @@ class upgradeModel extends model public function execute($fromVersion) { set_time_limit(0); + + $openVersion = $fromVersion; + if(strpos($fromVersion, 'pro') !== false) + { + $openVersion = $this->config->proVersion[$fromVersion]; + $this->executePro($fromVersion); + } + elseif(strpos($fromVersion, 'biz') !== false) + { + $openVersion = $this->config->bizVersion[$fromVersion]; + $proVersion = array_search($openVersion, $this->config->proVersion); + + $this->executePro($proVersion); + $this->executeBiz($fromVersion); + } + elseif(strpos($fromVersion, 'max') !== false) + { + $openVersion = $this->config->maxVersion[$fromVersion]; + $proVersion = array_search($openVersion, $this->config->proVersion); + $bizVersion = array_search($openVersion, $this->config->bizVersion); + + $this->executePro($proVersion); + $this->executeBiz($bizVersion); + $this->executeMax($fromVersion); + } + + $this->executeOpen($openVersion, $fromVersion); + } + + public function executeOpen($openVersion, $fromVersion) + { $executeXuanxuan = false; - switch($fromVersion) + switch($openVersion) { case '0_3beta': $this->saveLogs('Execute 0_3beta'); @@ -110,337 +141,259 @@ class upgradeModel extends model case '3_1': $this->saveLogs('Execute 3_1'); $this->execSQL($this->getUpgradeFile('3.1')); - $this->appendExec('3_1'); case '3_2': $this->saveLogs('Execute 3_2'); $this->execSQL($this->getUpgradeFile('3.2')); - $this->appendExec('3_2'); case '3_2_1': $this->saveLogs('Execute 3_2_1'); $this->execSQL($this->getUpgradeFile('3.2.1')); - $this->appendExec('3_2_1'); case '3_3': $this->saveLogs('Execute 3_3'); $this->execSQL($this->getUpgradeFile('3.3')); $this->updateTaskAssignedTo(); - $this->appendExec('3_3'); case '4_0_beta1': $this->saveLogs('Execute 4_0_beta1'); $this->execSQL($this->getUpgradeFile('4.0.beta1')); - $this->appendExec('4_0_beta1'); case '4_0_beta2': $this->saveLogs('Execute 4_0_beta2'); $this->execSQL($this->getUpgradeFile('4.0.beta2')); $this->updateProjectType(); $this->updateEstimatePriv(); - $this->appendExec('4_0_beta2'); case '4_0': $this->saveLogs('Execute 4_0'); $this->execSQL($this->getUpgradeFile('4.0')); - $this->appendExec('4_0'); case '4_0_1': $this->saveLogs('Execute 4_0_1'); $this->execSQL($this->getUpgradeFile('4.0.1')); $this->addPriv4_0_1(); - $this->appendExec('4_0_1'); case '4_1': $this->saveLogs('Execute 4_1'); $this->execSQL($this->getUpgradeFile('4.1')); $this->addPriv4_1(); $this->processTaskFinish(); $this->deleteCompany(); - $this->appendExec('4_1'); case '4_2_beta': $this->saveLogs('Execute 4_2_beta'); $this->execSQL($this->getUpgradeFile('4.2')); - $this->appendExec('4_2_beta'); case '4_3_beta': $this->saveLogs('Execute 4_3_beta'); $this->execSQL($this->getUpgradeFile('4.3')); - $this->appendExec('4_3_beta'); case '5_0_beta1': $this->saveLogs('Execute 5_0_beta1'); - $this->appendExec('5_0_beta1'); case '5_0_beta2': $this->saveLogs('Execute 5_0_beta2'); - $this->appendExec('5_0_beta2'); case '5_0': $this->saveLogs('Execute 5_0'); - $this->appendExec('5_0'); case '5_1': $this->saveLogs('Execute 5_1'); - $this->appendExec('5_1'); case '5_2': $this->saveLogs('Execute 5_2'); - $this->appendExec('5_2'); case '5_2_1': $this->saveLogs('Execute 5_2_1'); $this->mergeProjectGoalAndDesc(); $this->execSQL($this->getUpgradeFile('5.2.1')); - $this->appendExec('5_2_1'); case '5_3': $this->saveLogs('Execute 5_3'); - $this->appendExec('5_3'); case '6_0_beta1': $this->saveLogs('Execute 6_0_beta'); $this->execSQL($this->getUpgradeFile('6.0.beta1')); $this->toLowerTable(); $this->fixBugOSInfo(); $this->fixTaskFinishedBy(); - $this->appendExec('6_0_beta1'); case '6_0': $this->saveLogs('Execute 6_0'); $this->execSQL($this->getUpgradeFile('6.0')); $this->fixDataIndex(); - $this->appendExec('6_0'); case '6_1': $this->saveLogs('Execute 6_1'); $this->execSQL($this->getUpgradeFile('6.1')); - $this->appendExec('6_1'); case '6_2': $this->saveLogs('Execute 6_2'); - $this->appendExec('6_2'); case '6_3': $this->saveLogs('Execute 6_3'); - $this->appendExec('6_3'); case '6_4': $this->saveLogs('Execute 6_4'); - $this->appendExec('6_4'); case '7_0': $this->saveLogs('Execute 7_0'); $this->execSQL($this->getUpgradeFile('7.0')); - $this->appendExec('7_0'); case '7_1': $this->saveLogs('Execute 7_1'); $this->execSQL($this->getUpgradeFile('7.1')); $this->initOrder(); - $this->appendExec('7_1'); case '7_2': $this->saveLogs('Execute 7_2'); - $this->appendExec('7_2'); case '7_2_4': $this->saveLogs('Execute 7_2_4'); $this->execSQL($this->getUpgradeFile('7.2.4')); - $this->appendExec('7_2_4'); case '7_2_5': $this->saveLogs('Execute 7_2_5'); $this->adjustOrder7_3(); - $this->appendExec('7_2_5'); case '7_3': $this->saveLogs('Execute 7_3'); $this->execSQL($this->getUpgradeFile('7.3')); $this->adjustPriv7_4_beta(); - $this->appendExec('7_3'); case '7_4_beta': $this->saveLogs('Execute 7_4_beta'); $this->execSQL($this->getUpgradeFile('7.4.beta')); - $this->appendExec('7_4_beta'); case '8_0': $this->saveLogs('Execute 8_0'); - $this->appendExec('8_0'); case '8_0_1': $this->saveLogs('Execute 8_0_1'); $this->execSQL($this->getUpgradeFile('8.0.1')); $this->addPriv8_1(); - $this->appendExec('8_0_1'); case '8_1': $this->saveLogs('Execute 8_1'); $this->execSQL($this->getUpgradeFile('8.1')); - $this->appendExec('8_1'); case '8_1_3': $this->saveLogs('Execute 8_1_3'); $this->execSQL($this->getUpgradeFile('8.1.3')); $this->addPriv8_2_beta(); $this->adjustConfigSectionAndKey(); - $this->appendExec('8_1_3'); case '8_2_beta': $this->saveLogs('Execute 8_2_beta'); - $this->appendExec('8_2_beta'); case '8_2': $this->saveLogs('Execute 8_2'); - $this->appendExec('8_2'); case '8_2_1': $this->saveLogs('Execute 8_2_1'); $this->execSQL($this->getUpgradeFile('8.2.1')); - $this->appendExec('8_2_1'); case '8_2_2': $this->saveLogs('Execute 8_2_2'); - $this->appendExec('8_2_2'); case '8_2_3': $this->saveLogs('Execute 8_2_3'); - $this->appendExec('8_2_3'); case '8_2_4': $this->saveLogs('Execute 8_2_4'); - $this->appendExec('8_2_4'); case '8_2_5': $this->saveLogs('Execute 8_2_5'); - $this->appendExec('8_2_5'); case '8_2_6': $this->saveLogs('Execute 8_2_6'); $this->execSQL($this->getUpgradeFile('8.2.6')); $this->adjustDocModule(); $this->moveDocContent(); $this->adjustPriv8_3(); - $this->appendExec('8_2_6'); case '8_3': $this->saveLogs('Execute 8_3'); - $this->appendExec('8_3'); case '8_3_1': $this->saveLogs('Execute 8_3_1'); $this->execSQL($this->getUpgradeFile('8.3.1')); $this->renameMainLib(); $this->adjustPriv8_4(); - $this->appendExec('8_3_1'); case '8_4': $this->saveLogs('Execute 8_4'); - $this->appendExec('8_4'); case '8_4_1': $this->saveLogs('Execute 8_4_1'); $this->execSQL($this->getUpgradeFile('8.4.1')); - $this->appendExec('8_4_1'); case '9_0_beta': $this->saveLogs('Execute 9_0_beta'); $this->execSQL($this->getUpgradeFile('9.0.beta')); $this->adjustPriv9_0(); - $this->appendExec('9_0_beta'); case '9_0': $this->saveLogs('Execute 9_0'); $this->fixProjectProductData(); - $this->appendExec('9_0'); case '9_0_1': $this->saveLogs('Execute 9_0_1'); $this->execSQL($this->getUpgradeFile('9.0.1')); $this->addBugDeadlineToCustomFields(); $this->adjustPriv9_0_1(); - $this->appendExec('9_0_1'); case '9_1': $this->saveLogs('Execute 9_1'); $this->execSQL($this->getUpgradeFile('9.1')); - $this->appendExec('9_1'); case '9_1_1': $this->saveLogs('Execute 9_1_1'); $this->execSQL($this->getUpgradeFile('9.1.1')); - $this->appendExec('9_1_1'); case '9_1_2': $this->saveLogs('Execute 9_1_2'); $this->execSQL($this->getUpgradeFile('9.1.2')); $this->processCustomMenus(); $this->adjustPriv9_2(); - $this->appendExec('9_1_2'); case '9_2': $this->saveLogs('Execute 9_2'); - $this->appendExec('9_2'); case '9_2_1': $this->saveLogs('Execute 9_2_1'); - $this->appendExec('9_2_1'); case '9_3_beta': $this->saveLogs('Execute 9_3_beta'); $this->execSQL($this->getUpgradeFile('9.3.beta')); - $this->appendExec('9_3_beta'); case '9_4': $this->saveLogs('Execute 9_4'); $this->execSQL($this->getUpgradeFile('9.4')); $this->adjustPriv9_4(); - $this->appendExec('9_4'); case '9_5': $this->saveLogs('Execute 9_5'); $this->execSQL($this->getUpgradeFile('9.5')); - $this->appendExec('9_5'); case '9_5_1': $this->saveLogs('Execute 9_5_1'); $this->execSQL($this->getUpgradeFile('9.5.1')); $this->initProjectStoryOrder(); - $this->appendExec('9_5_1'); case '9_6': $this->saveLogs('Execute 9_6'); $this->execSQL($this->getUpgradeFile('9.6')); $this->fixDatatableColsConfig(); - $this->appendExec('9_6'); case '9_6_1': $this->saveLogs('Execute 9_6_1'); $this->addLimitedGroup(); - $this->appendExec('9_6_1'); case '9_6_2': $this->saveLogs('Execute 9_6_2'); - $this->appendExec('9_6_2'); case '9_6_3': $this->saveLogs('Execute 9_6_3'); $this->execSQL($this->getUpgradeFile('9.6.3')); $this->changeLimitedName(); $this->adjustPriv9_7(); $this->changeStoryWidth(); - $this->appendExec('9_6_3'); case '9_7': $this->saveLogs('Execute 9_7'); $this->execSQL($this->getUpgradeFile('9.7')); $this->changeTeamFields(); $this->moveData2Notify(); - $this->appendExec('9_7'); case '9_8': $this->saveLogs('Execute 9_8'); $this->fixTaskFinishedInfo(); - $this->appendExec('9_8'); case '9_8_1': $this->saveLogs('Execute 9_8_1'); $this->execSQL($this->getUpgradeFile('9.8.1')); $this->fixTaskAssignedTo(); $this->fixProjectClosedInfo(); $this->resetProductLine(); - $this->appendExec('9_8_1'); case '9_8_2': $this->saveLogs('Execute 9_8_2'); $this->execSQL($this->getUpgradeFile('9.8.2')); $this->addUniqueKeyToTeam(); - $this->appendExec('9_8_2'); case '9_8_3': $this->saveLogs('Execute 9_8_3'); $this->execSQL($this->getUpgradeFile('9.8.3')); $this->adjustPriv10_0_alpha(); - $this->appendExec('9_8_3'); case '10_0_alpha': $this->saveLogs('Execute 10_0_alpha'); $this->execSQL($this->getUpgradeFile('10.0.alpha')); $this->fixProjectStatisticBlock(); - $this->appendExec('10_0_alpha'); case '10_0_beta': $this->saveLogs('Execute 10_0_beta'); $this->execSQL($this->getUpgradeFile('10.0.beta')); - $this->appendExec('10_0_beta'); case '10_0': $this->saveLogs('Execute 10_0'); $this->execSQL($this->getUpgradeFile('10.0')); $this->fixStorySpecTitle(); $this->removeUnlinkPriv();//Remove unlink privilege for story, bug and testcase module. - $this->appendExec('10_0'); case '10_1': $this->saveLogs('Execute 10_1'); $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'xuanxuan.sql'; $this->execSQL($xuanxuanSql); $executeXuanxuan = true; - $this->appendExec('10_1'); case '10_2': $this->saveLogs('Execute 10_2'); - $this->appendExec('10_2'); case '10_3': $this->saveLogs('Execute 10_3'); - $this->appendExec('10_3'); case '10_3_1': $this->saveLogs('Execute 10_3_1'); $this->execSQL($this->getUpgradeFile('10.3.1')); $this->removeCustomMenu(); - $this->appendExec('10_3_1'); case '10_4': $this->saveLogs('Execute 10_4'); $this->execSQL($this->getUpgradeFile('10.4')); $this->changeTaskParentValue(); - $this->appendExec('10_4'); case '10_5': $this->saveLogs('Execute 10_5'); - $this->appendExec('10_5'); case '10_5_1': $this->saveLogs('Execute 10_5_1'); $this->execSQL($this->getUpgradeFile('10.5.1')); - $this->appendExec('10_5_1'); case '10_6': $this->saveLogs('Execute 10_6'); if(!$executeXuanxuan) @@ -451,10 +404,8 @@ class upgradeModel extends model $this->execSQL($xuanxuanSql); } $this->initXuanxuan(); - $this->appendExec('10_6'); case '11_0': $this->saveLogs('Execute 11_0'); - $this->appendExec('11_0'); case '11_1': $this->saveLogs('Execute 11_1'); $this->execSQL($this->getUpgradeFile('11.1')); @@ -468,21 +419,17 @@ class upgradeModel extends model $this->dao->update(TABLE_CONFIG)->set('value')->eq('off')->where('`key`')->eq('isHttps')->andWhere('`section`')->eq('xuanxuan')->andWhere('`value`')->eq('0')->exec(); $this->dao->update(TABLE_CONFIG)->set('value')->eq('on')->where('`key`')->eq('isHttps')->andWhere('`section`')->eq('xuanxuan')->andWhere('`value`')->eq('1')->exec(); } - $this->appendExec('11_1'); case '11_2': $this->saveLogs('Execute 11_2'); $this->execSQL($this->getUpgradeFile('11.2')); $this->processDocLibAcl(); - $this->appendExec('11_2'); case '11_3': $this->saveLogs('Execute 11_3'); $this->execSQL($this->getUpgradeFile('11.3')); $this->addPriv11_4(); - $this->appendExec('11_3'); case '11_4': $this->saveLogs('Execute 11_4'); $this->execSQL($this->getUpgradeFile('11.4')); - $this->appendExec('11_4'); case '11_4_1': $this->saveLogs('Execute 11_4_1'); $this->execSQL($this->getUpgradeFile('11.4.1')); @@ -498,38 +445,29 @@ class upgradeModel extends model } $this->updateXX_11_5(); } - $this->appendExec('11_4_1'); case '11_5': $this->saveLogs('Execute 11_5'); $this->execSQL($this->getUpgradeFile('11.5')); - $this->appendExec('11_5'); case '11_5_1': $this->saveLogs('Execute 11_5_1'); - $this->appendExec('11_5_1'); case '11_5_2': $this->saveLogs('Execute 11_5_2'); $this->execSQL($this->getUpgradeFile('11.5.2')); - $this->appendExec('11_5_2'); case '11_6': $this->saveLogs('Execute 11_6'); $this->execSQL($this->getUpgradeFile('11.6')); - $this->appendExec('11_6'); case '11_6_1': $this->saveLogs('Execute 11_6_1'); $this->adjustWebhookType(); $this->adjustPriv11_6_2(); - $this->appendExec('11_6_1'); case '11_6_2': $this->saveLogs('Execute 11_6_2'); - $this->appendExec('11_6_2'); case '11_6_3': $this->saveLogs('Execute 11_6_3'); $this->adjustPriv11_6_4(); - $this->appendExec('11_6_3'); case '11_6_4': $this->saveLogs('Execute 11_6_4'); $this->execSQL($this->getUpgradeFile('11.6.4')); - $this->appendExec('11_6_4'); case '11_6_5': $this->saveLogs('Execute 11_6_5'); $this->execSQL($this->getUpgradeFile('11.6.5')); @@ -552,21 +490,17 @@ class upgradeModel extends model } } - $this->appendExec('11_6_5'); case '11_7': $this->saveLogs('Execute 11_7'); $this->execSQL($this->getUpgradeFile('11.7')); $this->adjustPriv12_0(); $this->loadModel('setting')->setItem('system.common.global.showAnnual', '1'); - $this->appendExec('11_7'); case '12_0': $this->saveLogs('Execute 12_0'); - $this->appendExec('12_0'); case '12_0_1': $this->saveLogs('Execute 12_0_1'); $this->execSQL($this->getUpgradeFile('12.0.1')); $this->importRepoFromConfig(); - $this->appendExec('12_0_1'); case '12_1': $this->saveLogs('Execute 12_1'); $this->execSQL($this->getUpgradeFile('12.1')); @@ -580,73 +514,56 @@ class upgradeModel extends model } } - $this->appendExec('12_1'); case '12_2': $this->saveLogs('Execute 12_2'); $this->execSQL($this->getUpgradeFile('12.2')); - $this->appendExec('12_2'); case '12_3': $this->saveLogs('Execute 12_3'); - $this->appendExec('12_3'); case '12_3_1': $this->saveLogs('Execute 12_3_1'); - $this->appendExec('12_3_1'); case '12_3_2': $this->saveLogs('Execute 12_3_2'); $this->execSQL($this->getUpgradeFile('12.3.2')); - $this->appendExec('12_3_2'); case '12_3_3': $this->saveLogs('Execute 12_3_3'); $this->execSQL($this->getUpgradeFile('12.3.3')); $this->addPriv12_3_3(); $this->processImport2TaskBugs(); //Code for task #7552 - $this->appendExec('12_3_3'); case '12_4': $this->saveLogs('Execute 12_4'); $this->execSQL($this->getUpgradeFile('12.4')); - $this->appendExec('12_4'); case '12_4_1': $this->saveLogs('Execute 12_4_1'); $this->execSQL($this->getUpgradeFile('12.4.1')); - $this->appendExec('12_4_1'); case '12_4_2': $this->saveLogs('Execute 12_4_2'); $this->execSQL($this->getUpgradeFile('12.4.2')); $this->fixFromCaseVersion(); $this->initStoryOfPlan(); - $this->appendExec('12_4_2'); case '12_4_3': $this->saveLogs('Execute 12_4_3'); - $this->appendExec('12_4_3'); case '12_4_4': $this->saveLogs('Execute 12_4_4'); $this->execSQL($this->getUpgradeFile('12.4.4')); $this->adjustPriv12_5(); - $this->appendExec('12_4_4'); case '12_5': $this->saveLogs('Execute 12_5'); - $this->appendExec('12_5'); case '12_5_1': $this->saveLogs('Execute 12_5_1'); - $this->appendExec('12_5_1'); case '12_5_2': $this->saveLogs('Execute 12_5_2'); - $this->appendExec('12_5_2'); case '12_5_3': $this->saveLogs('Execute 12_5_3'); $this->execSQL($this->getUpgradeFile('12.5.3')); $this->adjustWhitelistOfProject(); $this->adjustWhitelistOfProduct(); $this->adjustPriv15_0(); - $this->appendExec('12_5_3'); case '15_0_rc1': $this->saveLogs('Execute 15_0_rc1'); $this->adjustUserView(); - $this->appendExec('15_0_rc1'); case '15_0_rc2': $this->saveLogs('Execute 15_0_rc2'); $this->execSQL($this->getUpgradeFile('15.0.rc2')); - $this->appendExec('15_0_rc2'); case '15_0_rc3': $this->saveLogs('Execute 15_0_rc3'); $this->execSQL($this->getUpgradeFile('15.0.rc3')); @@ -668,26 +585,21 @@ class upgradeModel extends model $this->updateRunCaseStatus(); $this->fix4TaskLinkProject(); $this->fixExecutionTeam(); - $this->appendExec('15_0_rc3'); case '15_0': $this->saveLogs('Execute 15_0'); $this->execSQL($this->getUpgradeFile('15.0')); $this->adjustBugOfProject(); $this->processBuildTable(); $this->updateProductVersion(); - $this->appendExec('15_0'); case '15_0_1': $this->saveLogs('Execute 15_0_1'); - $this->appendExec('15_0_1'); case '15_0_2': $this->saveLogs('Execute 15_0_2'); $this->execSQL($this->getUpgradeFile('15.0.2')); $this->uniqueProjectAdmin(); - $this->appendExec('15_0_2'); case '15_0_3': $this->saveLogs('Execute 15_0_3'); $this->execSQL($this->getUpgradeFile('15.0.3')); - $this->appendExec('15_0_3'); case '15_2': $this->saveLogs('Execute 15_2'); $this->execSQL($this->getUpgradeFile('15.2')); @@ -695,14 +607,12 @@ class upgradeModel extends model $this->processStoryFileType(); $this->processProductDoc(); $this->adjustPriv15_3(); - $this->appendExec('15_2'); case '15_3': $this->saveLogs('Execute 15_3'); $this->execSQL($this->getUpgradeFile('15.3')); $this->adjustBugRequired(); $this->processTesttaskDate(); $this->processDocTempContent(); - $this->appendExec('15_3'); case '15_4': $this->saveLogs('Execute 15_4'); $this->execSQL($this->getUpgradeFile('15.4')); @@ -716,61 +626,359 @@ class upgradeModel extends model $this->execSQL($xuanxuanSql); } } - $this->appendExec('15_4'); case '15_5': $this->saveLogs('Execute 15_5'); $this->execSQL($this->getUpgradeFile('15.5')); - $this->appendExec('15_5'); case '15_6': $this->saveLogs('Execute 15_6'); $this->execSQL($this->getUpgradeFile('15.6')); - $this->appendExec('15_6'); case '15_7': $this->saveLogs('Execute 15_7'); $this->execSQL($this->getUpgradeFile('15.7')); - $this->appendExec('15_7'); case '15_7_1': $this->saveLogs('Execute 15_7_1'); $this->execSQL($this->getUpgradeFile('15.7.1')); $this->updateObjectBranch(); $this->updateProjectStories(); $this->updateProjectLinkedBranch(); - $this->appendExec('15_7_1'); case '16_0_beta1': $this->saveLogs('Execute 16_0_beta1'); $this->execSQL($this->getUpgradeFile('16.0.beta1')); $this->loadModel('api')->createDemoData($this->lang->api->zentaoAPI, 'http://' . $_SERVER['HTTP_HOST'] . $this->app->config->webRoot . 'api.php/v1', '16.0'); - $this->appendExec('16_0_beta1'); case '16_0': $this->saveLogs('Execute 16_0'); $this->execSQL($this->getUpgradeFile('16.0')); - $this->appendExec('16_0'); case '16_1': $this->saveLogs('Execute 16_1'); $this->execSQL($this->getUpgradeFile('16.1')); $this->moveKanbanData(); - $this->appendExec('16_1'); case '16_2': $this->saveLogs('Execute 16_2'); $this->execSQL($this->getUpgradeFile('16.2')); $this->updateSpaceTeam(); $this->updateDocField(); - $this->appendExec('16_2'); case '16_3': $this->saveLogs('Execute 16_3'); $this->execSQL($this->getUpgradeFile('16.3')); - $this->appendExec('16_3'); case '16_4': + if(strpos($fromVersion, 'pro') === false and strpos($fromVersion, 'biz') === false and strpos($fromVersion, 'max') === false) + { + $this->upgradeFreeToPro(); + } + + if(strpos($fromVersion, 'biz') === false and strpos($fromVersion, 'max') === false) + { + $this->upgrade2Biz(); + } + + if(strpos($fromVersion, 'max') === false) $this->upgrade2Max(); + $this->saveLogs('Execute 16_4'); $this->execSQL($this->getUpgradeFile('16.4')); $this->updateActivatedDate(); - $this->appendExec('16_4'); } $this->deletePatch(); return true; } + /** + * Execute pro version sql. + * + * @param string $fromVersion + * @access public + * @return void + */ + public function executePro($fromVersion) + { + switch($fromVersion) + { + case 'pro1_0': + $this->execSQL($this->getUpgradeFile('pro1.0')); + case 'pro1_1': + case 'pro1_1_1': + $this->execSQL($this->getUpgradeFile('pro1.1')); + case 'pro1_2': + case 'pro1_3': + $this->execSQL($this->getUpgradeFile('pro1.3')); + case 'pro2_0': + case 'pro2_0_1': + case 'pro2_1': + $this->execSQL($this->getUpgradeFile('pro2.1')); + case 'pro2_2_beta': + case 'pro2_3_beta': + case 'pro3_0_beta1': + case 'pro3_0': + $this->execSQL($this->getUpgradeFile('pro3.0')); + case 'pro3_1': + case 'pro3_2': + case 'pro3_2_1': + $this->recordFinished(); + case 'pro3_3': + case 'pro4_0_beta1': + case 'pro4_0': + $this->execSQL($this->getUpgradeFile('pro4.0')); + $this->fixRepo(); + case 'pro4_1_beta': + case 'pro4_2': + $this->execSQL($this->getUpgradeFile('pro4.2')); + case 'pro4_3': + $this->execSQL($this->getUpgradeFile('pro4.3')); + case 'pro4_4': + $this->execSQL($this->getUpgradeFile('pro4.4')); + case 'pro4_5': + $this->execSQL($this->getUpgradeFile('pro4.5')); + case 'pro4_6': + $this->execSQL($this->getUpgradeFile('pro4.6')); + case 'pro4_7': + case 'pro4_7_1': + $this->execSQL($this->getUpgradeFile('pro4.7.1')); + case 'pro5_0': + case 'pro5_0_1': + $this->execSQL($this->getUpgradeFile('pro5.0.1')); + case 'pro5_1': + case 'pro5_1_3': + $this->execSQL($this->getUpgradeFile('pro5.1.3')); + case 'pro5_2': + case 'pro5_2_1': + case 'pro5_3': + case 'pro5_3_1': + case 'pro5_3_2': + case 'pro5_3_3': + case 'pro5_4': + case 'pro5_4_1': + case 'pro5_5': + case 'pro5_5_1': + case 'pro6_0_beta': + case 'pro6_0': + case 'pro6_0_1': + case 'pro6_1': + case 'pro6_2': + case 'pro6_3': + case 'pro6_3_1': + case 'pro6_4': + $this->execSQL($this->getUpgradeFile('pro6.4')); + case 'pro6_5': + case 'pro6_5_1': + $this->execSQL($this->getUpgradeFile('pro6.5.1')); + case 'pro6_6': + case 'pro6_6_1': + $this->execSQL($this->getUpgradeFile('pro6.6.1')); + case 'pro6_7': + case 'pro6_7_1': + case 'pro6_7_2': + case 'pro6_7_3': + case 'pro7_0_beta': + $this->execSQL($this->getUpgradeFile('pro7.0.beta')); + $this->fixReport(); + case 'pro7_1': + case 'pro7_2': + case 'pro7_3': + case 'pro7_4': + case 'pro7_5': + case 'pro7_5_1': + $this->execSQL($this->getUpgradeFile('pro7.5.1')); + case 'pro8_0': + case 'pro8_1': + case 'pro8_2': + $this->execSQL($this->getUpgradeFile('pro8.2')); + case 'pro8_3': + $this->execSQL($this->getUpgradeFile('pro8.3')); + $this->execSQL($this->getUpgradeFile('pro8.2')); //Fix bug #1752. + case 'pro8_3_1': + case 'pro8_4': + $this->execSQL($this->getUpgradeFile('pro8.4')); + case 'pro8_5': + case 'pro8_5_1': + $this->execSQL($this->getUpgradeFile('pro8.5.1')); + case 'pro8_5_2': + case 'pro8_5_3': + case 'pro8_6': + $this->execSQL($this->getUpgradeFile('pro8.6')); + case 'pro8_7': + case 'pro8_8': + $this->checkURAndSR(); + case 'pro8_8_1': + case 'pro8_8_2': + case 'pro8_8_3': + case 'pro8_9': + case 'pro8_9_1': + case 'pro8_9_2': + case 'pro8_9_3': + $this->execSQL($this->getUpgradeFile('pro8.9.3')); + case 'pro8_9_4': + case 'pro9_0': + case 'pro9_0_1': + case 'pro9_0_2': + case 'pro9_0_3': + $this->execSQL($this->getUpgradeFile('pro9.0.3')); + case 'pro10_0_rc1': + case 'pro10_0': + case 'pro10_0_1': + case 'pro10_0_2': + $this->execSQL($this->getUpgradeFile('pro10.0.2')); + $this->fixReportLang(); + case 'pro10_1': + case 'pro10_2': + case 'pro10_3': + case 'pro10_3_1': + case 'pro11_0_beta1': + } + } + + /** + * Execute biz upgrade program. + * + * @param int $fromVersion + * @access public + * @return void + */ + public function executeBiz($fromVersion) + { + $executeXuanxuan = false; + switch($fromVersion) + { + case 'biz1_0': + $this->execSQL($this->getUpgradeFile('biz1.0')); + case 'biz1_1': + case 'biz1_1_1': + case 'biz1_1_2': + case 'biz1_1_3': + case 'biz1_1_4': + case 'biz2_0_beta': + $executeXuanxuan = true; + case 'biz2_1': + case 'biz2_2': + $this->execSQL($this->getUpgradeFile('biz2.2')); + case 'biz2_3': + case 'biz2_3_1': + $this->execSQL($this->getUpgradeFile('biz2.3.1')); + $this->adjustFeedbackViewData(); + case 'biz2_4': + $this->execSQL($this->getUpgradeFile('biz2.4')); + case 'biz3_0': + if(!empty($this->config->isINT) and !$executeXuanxuan) + { + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.3.0.sql'; + $this->execSQL($xuanxuanSql); + $this->dao->update(TABLE_CONFIG)->set('value')->eq('off')->where('`key`')->eq('isHttps')->andWhere('`section`')->eq('xuanxuan')->andWhere('`value`')->eq('0')->exec(); + $this->dao->update(TABLE_CONFIG)->set('value')->eq('on')->where('`key`')->eq('isHttps')->andWhere('`section`')->eq('xuanxuan')->andWhere('`value`')->eq('1')->exec(); + } + case 'biz3_1': + case 'biz3_2': $this->execSQL($this->getUpgradeFile('biz3.2')); + case 'biz3_2_1': + if(!empty($this->config->isINT)) + { + if(!$executeXuanxuan) + { + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.4.0.sql'; + $this->execSQL($xuanxuanSql); + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.5.0.sql'; + $this->execSQL($xuanxuanSql); + } + $this->updateXX_11_5(); + } + case 'biz3_3': $this->execSQL($this->getUpgradeFile('biz3.3')); + case 'biz3_4': + $this->execSQL($this->getUpgradeFile('biz3.4')); + $this->importBuildinModules(); + case 'biz3_5_alpha': + $this->execSQL($this->getUpgradeFile('biz3.5.alpha')); + $this->addSubStatus(); + case 'biz3_5_beta': + $this->execSQL($this->getUpgradeFile('biz3.5.beta')); + $this->processSubTables(); + case 'biz3_5': + case 'biz3_5_1': + case 'biz3_6': + $this->addDefaultActions(); + $this->importCaseLibModule(); + $this->deleteBuildinFields(); + case 'biz3_6_1': + $this->execSQL($this->getUpgradeFile('biz3.6.1')); + $this->addWorkflowActions(); + $this->processWorkflowLayout(); + $this->processWorkflowLabel(); + $this->processWorkflowCondition(); + if(!empty($this->config->isINT) and !$executeXuanxuan) + { + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan3.1.1.sql'; + $this->execSQL($xuanxuanSql); + } + case 'biz3_7': + $this->execSQL($this->getUpgradeFile('biz3.7')); + $this->processWorkflowFields(); + case 'biz3_7_1': + $this->execSQL($this->getUpgradeFile('biz3.7.1')); + case 'biz3_7_2': + $this->execSQL($this->getUpgradeFile('biz3.7.2')); + $this->processFlowStatus(); + case 'biz4_0': + $this->execSQL($this->getUpgradeFile('biz4.0')); + case 'biz4_0_1': + $this->execSQL($this->getUpgradeFile('biz4.0.1')); + $this->addMailtoFields(); + case 'biz4_0_2': $this->execSQL($this->getUpgradeFile('biz4.0.2')); + case 'biz4_0_3': + $this->execSQL($this->getUpgradeFile('biz4.0.3')); + $this->updateAttendStatus(); + $this->initView4WorkflowDatasource(); + case 'biz4_0_4': + $this->execSQL($this->getUpgradeFile('biz4.0.4')); + case 'biz4_1': + case 'biz4_1_1': + case 'biz4_1_2': + case 'biz4_1_3': + $this->execSQL($this->getUpgradeFile('biz4.1.3')); + case 'biz5_0_rc1': + $this->execSQL($this->getUpgradeFile('biz5.0.rc1')); + case 'biz5_0': + $this->adjustPrivBiz5_0_1(); + case 'biz5_0_1': + $this->execSQL($this->getUpgradeFile('biz5.0.1')); + $this->updateWorkflow4Execution(); + case 'biz5_1': + $this->execSQL($this->getUpgradeFile('biz5.1')); + case 'biz5_2': + case 'biz5_3': + case 'biz5_3_1': + $this->execSQL($this->getUpgradeFile('biz5.3.1')); + $this->processFeedbackField(); + $this->addFileFields(); + $this->addReportActions(); + case 'biz6_0_beta1': + $this->execSQL($this->getUpgradeFile('biz6.0.beta1')); + case 'biz6_0': + case 'biz6_1': + case 'biz6_2': + $this->importLiteModules(); + } + } + + /** + * Execute upgrade program for max version. + * + * @param string $fromVersion + * @access public + * @return void + */ + public function executeMax($fromVersion) + { + switch($fromVersion) + { + case 'max2_0_beta4': + $this->execSQL($this->getUpgradeFile('max2.0.beta4')); + case 'max2_0': + $this->execSQL($this->getUpgradeFile('max2.0')); + case 'max2_2': + $this->execSQL($this->getUpgradeFile('max2.2')); + case 'max2_3_1': + $this->execSQL($this->getUpgradeFile('max2.3.1')); + case 'max2_4_beta1': + $this->execSQL($this->getUpgradeFile('max2.4.beta1')); + } + } + /** * Create the confirm contents. * @@ -781,7 +989,49 @@ class upgradeModel extends model public function getConfirm($fromVersion) { $confirmContent = ''; - switch($fromVersion) + + $openVersion = $fromVersion; + if(strpos($fromVersion, 'pro') !== false) + { + $openVersion = $this->config->proVersion[$fromVersion]; + $confirmContent .= $this->getProConfirm($fromVersion); + } + elseif(strpos($fromVersion, 'biz') !== false) + { + $openVersion = $this->config->bizVersion[$fromVersion]; + $proVersion = array_search($openVersion, $this->config->proVersion); + + $confirmContent .= $this->getProConfirm($proVersion); + $confirmContent .= $this->getBizConfirm($fromVersion); + } + elseif(strpos($fromVersion, 'max') !== false) + { + $openVersion = $this->config->maxVersion[$fromVersion]; + $proVersion = array_search($openVersion, $this->config->proVersion); + $bizVersion = array_search($openVersion, $this->config->bizVersion); + + $confirmContent .= $this->getProConfirm($proVersion); + $confirmContent .= $this->getBizConfirm($bizVersion); + $confirmContent .= $this->getMaxConfirm($fromVersion); + } + + $confirmContent .= $this->getOpenConfirm($openVersion, $fromVersion); + + return str_replace('zt_', $this->config->db->prefix, $confirmContent); + } + + /** + * Get open source confirm contents. + * + * @param string $openVersion + * @param string $fromVersion + * @access public + * @return void + */ + public function getOpenConfirm($openVersion, $fromVersion) + { + $confirmContent = ''; + switch($openVersion) { case '0_3beta': $confirmContent .= file_get_contents($this->getUpgradeFile('0.3')); case '0_4beta': $confirmContent .= file_get_contents($this->getUpgradeFile('0.4')); @@ -976,8 +1226,237 @@ class upgradeModel extends model case '16_1': $confirmContent .= file_get_contents($this->getUpgradeFile('16.1')); case '16_2': $confirmContent .= file_get_contents($this->getUpgradeFile('16.2')); case '16_3': $confirmContent .= file_get_contents($this->getUpgradeFile('16.3')); + case '16_4': + if(strpos($fromVersion, 'pro') === false and strpos($fromVersion, 'biz') === false and strpos($fromVersion, 'max') === false) + { + $confirmContent .= file_get_contents($this->getUpgradeFile('proinstall')); + } + + if(strpos($fromVersion, 'biz') === false and strpos($fromVersion, 'max') === false) + { + $confirmContent .= file_get_contents($this->getUpgradeFile('bizinstall')); + } + + if(strpos($fromVersion, 'max') === false) + { + $confirmContent .= file_get_contents($this->getUpgradeFile('maxinstall')); + $confirmContent .= file_get_contents($this->getUpgradeFile('functions')); + } + + $confirmContent .= file_get_contents($this->getUpgradeFile('16.4')); } - return str_replace('zt_', $this->config->db->prefix, $confirmContent); + + return $confirmContent; + } + + /** + * Get pro version confirm contents. + * + * @param string $fromVersion + * @access public + * @return void + */ + public function getProConfirm($fromVersion) + { + $confirmContent = ''; + switch($fromVersion) + { + case 'pro1_0': $confirmContent .= file_get_contents($this->getUpgradeFile('pro1.0')); + case 'pro1_1': + case 'pro1_1_1': $confirmContent .= file_get_contents($this->getUpgradeFile('pro1.1')); + case 'pro1_2': + case 'pro1_3': $confirmContent .= file_get_contents($this->getUpgradeFile('pro1.3')); + case 'pro2_0': + case 'pro2_0_1': + case 'pro2_1': $confirmContent .= file_get_contents($this->getUpgradeFile('pro2.1')); + case 'pro2_2_beta': + case 'pro2_3_beta': + case 'pro3_0_beta1': + case 'pro3_0': $confirmContent .= file_get_contents($this->getUpgradeFile('pro3.0')); + case 'pro3_1': + case 'pro3_2': + case 'pro3_2_1': + case 'pro3_3': + case 'pro4_0_beta1': + case 'pro4_0': $confirmContent .= file_get_contents($this->getUpgradeFile('pro4.0')); + case 'pro4_1_beta': + case 'pro4_2': $confirmContent .= file_get_contents($this->getUpgradeFile('pro4.2')); + case 'pro4_3': $confirmContent .= file_get_contents($this->getUpgradeFile('pro4.3')); + case 'pro4_4': $confirmContent .= file_get_contents($this->getUpgradeFile('pro4.4')); + case 'pro4_5': $confirmContent .= file_get_contents($this->getUpgradeFile('pro4.5')); + case 'pro4_6': $confirmContent .= file_get_contents($this->getUpgradeFile('pro4.6')); + case 'pro4_7': + case 'pro4_7_1': $confirmContent .= file_get_contents($this->getUpgradeFile('pro4.7.1')); + case 'pro5_0': + case 'pro5_0_1': $confirmContent .= file_get_contents($this->getUpgradeFile('pro5.0.1')); + case 'pro5_1': + case 'pro5_1_3': $confirmContent .= file_get_contents($this->getUpgradeFile('pro5.1.3')); + case 'pro5_2': + case 'pro5_2_1': + case 'pro5_3': + case 'pro5_3_1': + case 'pro5_3_2': + case 'pro5_3_3': + case 'pro5_4': + case 'pro5_4_1': + case 'pro5_5': + case 'pro5_5_1': + case 'pro6_0_beta': + case 'pro6_0': + case 'pro6_0_1': + case 'pro6_1': + case 'pro6_2': + case 'pro6_3': + case 'pro6_3_1': + case 'pro6_4': $confirmContent .= file_get_contents($this->getUpgradeFile('pro6.4')); + case 'pro6_5': + case 'pro6_5_1': $confirmContent .= file_get_contents($this->getUpgradeFile('pro6.5.1')); + case 'pro6_6': + case 'pro6_6_1': $confirmContent .= file_get_contents($this->getUpgradeFile('pro6.6.1')); + case 'pro6_7': + case 'pro6_7_1': + case 'pro6_7_2': + case 'pro6_7_3': + case 'pro7_0_beta': $confirmContent .= file_get_contents($this->getUpgradeFile('pro7.0.beta')); + case 'pro7_1': + case 'pro7_2': + case 'pro7_3': + case 'pro7_4': + case 'pro7_5': + case 'pro7_5_1': $confirmContent .= file_get_contents($this->getUpgradeFile('pro7.5.1')); + case 'pro8_0': + case 'pro8_1': + case 'pro8_2': $confirmContent .= file_get_contents($this->getUpgradeFile('pro8.2')); + case 'pro8_3': $confirmContent .= file_get_contents($this->getUpgradeFile('pro8.3')); + case 'pro8_3_1': + case 'pro8_4': $confirmContent .= file_get_contents($this->getUpgradeFile('pro8.4')); + case 'pro8_5': + case 'pro8_5_1': $confirmContent .= file_get_contents($this->getUpgradeFile('pro8.5.1')); + case 'pro8_5_2': + case 'pro8_5_3': + case 'pro8_6': $confirmContent .= file_get_contents($this->getUpgradeFile('pro8.6')); + case 'pro8_7': + case 'pro8_8': + case 'pro8_8_1': + case 'pro8_8_2': + case 'pro8_8_3': + case 'pro8_9': + case 'pro8_9_1': + case 'pro8_9_2': + case 'pro8_9_3': $confirmContent .= file_get_contents($this->getUpgradeFile('pro8.9.3')); + case 'pro8_9_4': + case 'pro9_0': + case 'pro9_0_1': + case 'pro9_0_2': + case 'pro9_0_3': $confirmContent .= file_get_contents($this->getUpgradeFile('pro9.0.3')); + case 'pro10_0_rc1': + case 'pro10_0': + case 'pro10_0_1': + case 'pro10_0_2': $confirmContent .= file_get_contents($this->getUpgradeFile('pro10.0.2')); + case 'pro10_1': + case 'pro10_2': + case 'pro10_3': + case 'pro10_3_1': + case 'pro11_0_beta1': + } + + return $confirmContent; + } + + /** + * Get biz version confirm contents. + * + * @param string $fromVersion + * @access public + * @return void + */ + public function getBizConfirm($fromVersion) + { + $confirmContent = ''; + switch($fromVersion) + { + case 'biz1_0': $confirmContent .= file_get_contents($this->getUpgradeFile('biz1.0')); + case 'biz1_1': + case 'biz1_1_1': + case 'biz1_1_2': + case 'biz1_1_3': + case 'biz1_1_4': + case 'biz2_0_beta': + case 'biz2_1': + case 'biz2_2': $confirmContent .= file_get_contents($this->getUpgradeFile('biz2.2')); + case 'biz2_3': + case 'biz2_3_1': $confirmContent .= file_get_contents($this->getUpgradeFile('biz2.3.1')); + case 'biz2_4': $confirmContent .= file_get_contents($this->getUpgradeFile('biz2.4')); + case 'biz3_0': + if(!empty($this->config->isINT)) + { + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.3.0.sql'; + $confirmContent .= file_get_contents($xuanxuanSql); + } + case 'biz3_1': + case 'biz3_2': $confirmContent .= file_get_contents($this->getUpgradeFile('biz3.2')); + case 'biz3_2_1': + case 'biz3_3': $confirmContent .= file_get_contents($this->getUpgradeFile('biz3.3')); + case 'biz3_4': $confirmContent .= file_get_contents($this->getUpgradeFile('biz3.4')); + case 'biz3_5_alpha': $confirmContent .= file_get_contents($this->getUpgradeFile('biz3.5.alpha')); + case 'biz3_5_beta': $confirmContent .= file_get_contents($this->getUpgradeFile('biz3.5.beta')); + case 'biz3_5': + case 'biz3_5_1': + case 'biz3_6': + case 'biz3_6_1': $confirmContent .= file_get_contents($this->getUpgradeFile('biz3.6.1')); + case 'biz3_7': $confirmContent .= file_get_contents($this->getUpgradeFile('biz3.7')); + case 'biz3_7_1': $confirmContent .= file_get_contents($this->getUpgradeFile('biz3.7.1')); + case 'biz3_7_2': $confirmContent .= file_get_contents($this->getUpgradeFile('biz3.7.2')); + case 'biz4_0': $confirmContent .= file_get_contents($this->getUpgradeFile('biz4.0')); + case 'biz4_0_1': $confirmContent .= file_get_contents($this->getUpgradeFile('biz4.0.1')); + case 'biz4_0_2': $confirmContent .= file_get_contents($this->getUpgradeFile('biz4.0.2')); + case 'biz4_0_3': $confirmContent .= file_get_contents($this->getUpgradeFile('biz4.0.3')); + case 'biz4_0_4': $confirmContent .= file_get_contents($this->getUpgradeFile('biz4.0.4')); + case 'biz4_1': + case 'biz4_1_1': + case 'biz4_1_2': + case 'biz4_1_3': $confirmContent .= file_get_contents($this->getUpgradeFile('biz4.1.3')); + case 'biz5_0_rc1': $confirmContent .= file_get_contents($this->getUpgradeFile('biz5.0.rc1')); + case 'biz5_0': + case 'biz5_0_1': $confirmContent .= file_get_contents($this->getUpgradeFile('biz5.0.1')); + case 'biz5_1': $confirmContent .= file_get_contents($this->getUpgradeFile('biz5.1')); + case 'biz5_2': + case 'biz5_3': + case 'biz5_3_1': $confirmContent .= file_get_contents($this->getUpgradeFile('biz5.3.1')); + case 'biz6_0_beta1': $confirmContent .= file_get_contents($this->getUpgradeFile('biz6.0.beta1')); + case 'biz6_0': + case 'biz6_1': + } + + return $confirmContent; + } + + /** + * Get max version confirm contents. + * + * @param string $fromVersion + * @access public + * @return void + */ + public function getMaxConfirm($fromVersion) + { + $confirmContent = ''; + if($fromVersion == 'max2_0_beta4' && $this->config->version != 'max2.0.rc1') $fromVersion = 'max2_0_rc1'; + + switch($fromVersion) + { + case 'max2_0_rc1': + case 'max2_0_beta4': $confirmContent .= file_get_contents($this->getUpgradeFile('max2.0.beta4')); + case 'max2_0': $confirmContent .= file_get_contents($this->getUpgradeFile('max2.0')); + case 'max2_1': + case 'max2_2': $confirmContent .= file_get_contents($this->getUpgradeFile('max2.2')); + case 'max2_3': + case 'max2_3_1': $confirmContent .= file_get_contents($this->getUpgradeFile('max2.3.1')); + case 'max2_4_beta1': $confirmContent .= file_get_contents($this->getUpgradeFile('max2.4.beta1')); + case 'max2_4': + } + + return $confirmContent; } /** @@ -4961,17 +5440,6 @@ class upgradeModel extends model return true; } - /** - * Append execute for pro and biz. - * - * @param string $fromVersion - * @access public - * @return void - */ - public function appendExec($zentaoVersion) - { - } - /** * Init story sort of plan. *