From ba9b5130cbb06c9346e188ffd493bc8c998956e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Mon, 23 Aug 2021 13:55:25 +0800 Subject: [PATCH 01/47] * adjust for upgrade. --- db/update12.5.3.sql | 1 + module/upgrade/model.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/db/update12.5.3.sql b/db/update12.5.3.sql index b9eb64078d..68f393fde4 100644 --- a/db/update12.5.3.sql +++ b/db/update12.5.3.sql @@ -30,6 +30,7 @@ ALTER TABLE `zt_burn` CHANGE `project` `execution` mediumint(8) unsigned NOT NUL ALTER TABLE `zt_doc` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_relation` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_relation` CHANGE `program` `project` mediumint(8) unsigned NOT NULL; +ALTER TABLE `zt_case` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_doclib` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_task` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_testreport` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 15029f57b7..bc6e6061d6 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -698,6 +698,7 @@ class upgradeModel extends model $this->appendExec('15_2'); case '15_3': $this->saveLogs('Execute 15_3'); + $this->execSQL($this->getUpgradeFile('15.3')); $this->adjustBugRequired(); $this->processTesttaskDate(); $this->processDocTempContent(); @@ -894,7 +895,7 @@ class upgradeModel extends model case '15_0_2': $confirmContent .= file_get_contents($this->getUpgradeFile('15.0.2')); case '15_0_3': $confirmContent .= file_get_contents($this->getUpgradeFile('15.0.3')); case '15_2': $confirmContent .= file_get_contents($this->getUpgradeFile('15.2')); - case '15_3': + case '15_3': $confirmContent .= file_get_contents($this->getUpgradeFile('15.3')); } return str_replace('zt_', $this->config->db->prefix, $confirmContent); } From 19ad7b2dfbda2c0d9044aab70e5a10eddb5c54a6 Mon Sep 17 00:00:00 2001 From: holan20180123 Date: Mon, 23 Aug 2021 13:55:41 +0800 Subject: [PATCH 02/47] * Fix bug #14538. --- module/upgrade/lang/zh-cn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/upgrade/lang/zh-cn.php b/module/upgrade/lang/zh-cn.php index 907a6b1592..4b75b95a48 100644 --- a/module/upgrade/lang/zh-cn.php +++ b/module/upgrade/lang/zh-cn.php @@ -90,7 +90,7 @@ $lang->upgrade->mergeProgramDesc = <<可以选择这些{$lang->projectCommon}归属于某个新项目下。

EOD; -$lang->upgrade->to15Mode['classic'] = '保持老版本的习惯'; +$lang->upgrade->to15Mode['classic'] = '经典管理模式'; $lang->upgrade->to15Mode['new'] = '全新项目集管理模式'; $lang->upgrade->selectedModeTips['classic'] = '后续您还可以在后台-自定义里面切换为全新项目集管理的模式。'; From 56c3453dd7c94e38fd0a12a0f531aec3f829dcae Mon Sep 17 00:00:00 2001 From: holan20180123 Date: Mon, 23 Aug 2021 14:01:18 +0800 Subject: [PATCH 03/47] * Fix bug #14536. --- module/install/lang/en.php | 4 ++-- module/install/lang/zh-cn.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/install/lang/en.php b/module/install/lang/en.php index 07c584a680..cb252f3eb2 100644 --- a/module/install/lang/en.php +++ b/module/install/lang/en.php @@ -63,8 +63,8 @@ $lang->install->introductionContent = << EOT; diff --git a/module/install/lang/zh-cn.php b/module/install/lang/zh-cn.php index fa00594624..ba3fbce15e 100644 --- a/module/install/lang/zh-cn.php +++ b/module/install/lang/zh-cn.php @@ -46,7 +46,7 @@ $lang->install->howToUse = "请问您计划如何使用禅道的新 $lang->install->introductionContent = <<

尊敬的用户您好,欢迎您使用禅道%s。

-

禅道%s提供了两种使用模式, 一种是精典管理模式,功能较为精简,提供了产品和项目两个核心功能;另一种是全新项目集管理模式,具备所有核心功能。如下是相关功能介绍,您可以根据需要选择使用的模式。

+

禅道%s提供了两种使用模式, 一种是经典管理模式,功能较为精简,提供了产品和项目两个核心功能;另一种是全新项目集管理模式,具备所有核心功能。如下是相关功能介绍,您可以根据需要选择使用的模式。

项目集

项目集是一组相互关联,且被协调管理的项目集合,可以进行多层级管理,属于战略层面的管理。

@@ -63,8 +63,8 @@ $lang->install->introductionContent = <<
EOT; From f95496efe327006b9522dad7a4badae0749e1f6c Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Mon, 23 Aug 2021 14:22:08 +0800 Subject: [PATCH 04/47] * Modify the problem of can select project in classic mode. --- module/doc/model.php | 4 ++-- module/execution/view/all.html.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/doc/model.php b/module/doc/model.php index 5fcf447678..4f277425bb 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1259,7 +1259,7 @@ class docModel extends model $orderedExecutions = array(); foreach($executions as $id => $execution) { - $execution->name = zget($projectPairs, $execution->project) . ' / ' . $execution->name; + $execution->name = $this->config->systemMode == 'new' ? zget($projectPairs, $execution->project) . ' / ' . $execution->name : $execution->name; if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM == $this->app->user->account) { @@ -2070,7 +2070,7 @@ class docModel extends model if($this->app->openApp == 'doc' and $type != 'custom' and $type != 'book') { - $objectTitle = $type == 'execution' ? substr($objects[$objectID], strpos($objects[$objectID], '/') + 1) : $objects[$objectID]; + $objectTitle = ($this->config->systemMode == 'new' and $type == 'execution') ? substr($objects[$objectID], strpos($objects[$objectID], '/') + 1) : $objects[$objectID]; $output = << diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index fead9655c1..557539337a 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -31,7 +31,7 @@ td.hours {text-align: right; overflow: hidden; text-overflow: ellipsis; white-sp execution->featureBar['all'] as $key => $label):?> createLink($this->app->rawModule, $this->app->rawMethod, "status=$key&projectID=$projectID&orderBy=$orderBy&productID=$productID"), "{$label}", '', "class='btn btn-link' id='{$key}Tab' data-app='$from'");?> - + config->systemMode == 'new'):?>
execution->selectProject}'");?>
From cd6592eaaf724eb3eec4909b2bc487ae35b3ac67 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 23 Aug 2021 14:23:44 +0800 Subject: [PATCH 05/47] * Synchronize the roles of team members when copying a team. --- module/execution/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/model.php b/module/execution/model.php index 9b70acbf43..723382a482 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -379,7 +379,7 @@ class executionModel extends model /* Set team of execution. */ $members = isset($_POST['teamMembers']) ? $_POST['teamMembers'] : array(); - $roles = $this->loadModel('user')->getUserRoles(array_keys($members)); + $roles = $this->loadModel('user')->getUserRoles(array_values($members)); foreach($members as $account) { if(empty($account)) continue; From 7c08153b7c55640539b350fa88995c40eacab341 Mon Sep 17 00:00:00 2001 From: holan20180123 Date: Mon, 23 Aug 2021 14:39:23 +0800 Subject: [PATCH 06/47] * Fix bug #14543. --- module/execution/lang/en.php | 12 ++++++------ module/execution/lang/zh-cn.php | 12 ++++++------ module/execution/view/managemembers.html.php | 3 ++- module/personnel/control.php | 9 +++++---- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index c395805005..f70d948559 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -295,12 +295,12 @@ $lang->execution->doneExecutions = 'Finished'; $lang->execution->selectDept = 'Select Department'; $lang->execution->selectDeptTitle = 'Select User'; $lang->execution->copyTeam = 'Copy Team'; -$lang->execution->copyFromTeam = "Copy from {$lang->executionCommon} Team: %s"; -$lang->execution->noMatched = "No $lang->executionCommon including '%s'can be found."; -$lang->execution->copyTitle = "Choose a {$lang->executionCommon} to copy."; -$lang->execution->copyTeamTitle = "Choose a {$lang->projectCommon} or {$lang->executionCommon} Team to copy."; -$lang->execution->copyNoExecution = "No {$lang->executionCommon} can be copied."; -$lang->execution->copyFromExecution = "Copy from {$lang->executionCommon} %s"; +$lang->execution->copyFromTeam = "Copy from {$lang->execution->common} Team: %s"; +$lang->execution->noMatched = "No {$lang->execution->common} including '%s'can be found."; +$lang->execution->copyTitle = "Choose a {$lang->execution->common} to copy."; +$lang->execution->copyTeamTitle = "Choose a {$lang->projectCommon} or {$lang->execution->common} Team to copy."; +$lang->execution->copyNoExecution = "No {$lang->execution->common} can be copied."; +$lang->execution->copyFromExecution = "Copy from {$lang->execution->common} %s"; $lang->execution->cancelCopy = 'Cancel Copy'; $lang->execution->byPeriod = 'By Time'; $lang->execution->byUser = 'By User'; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index d3b5f6dea1..700ee01ad7 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -295,12 +295,12 @@ $lang->execution->doneExecutions = '已结束'; $lang->execution->selectDept = '选择部门'; $lang->execution->selectDeptTitle = '选择一个部门的成员'; $lang->execution->copyTeam = '复制团队'; -$lang->execution->copyFromTeam = "复制自{$lang->executionCommon}团队: %s"; -$lang->execution->noMatched = "找不到包含'%s'的$lang->executionCommon"; -$lang->execution->copyTitle = "请选择一个{$lang->executionCommon}来复制"; -$lang->execution->copyTeamTitle = "选择一个{$lang->projectCommon}或{$lang->executionCommon}团队来复制"; -$lang->execution->copyNoExecution = "没有可用的{$lang->executionCommon}来复制"; -$lang->execution->copyFromExecution = "复制自{$lang->executionCommon} %s"; +$lang->execution->copyFromTeam = "复制自{$lang->execution->common}团队: %s"; +$lang->execution->noMatched = "找不到包含'%s'的{$lang->execution->common}"; +$lang->execution->copyTitle = "请选择一个{$lang->execution->common}来复制"; +$lang->execution->copyTeamTitle = "选择一个{$lang->projectCommon}或{$lang->execution->common}团队来复制"; +$lang->execution->copyNoExecution = "没有可用的{$lang->execution->common}来复制"; +$lang->execution->copyFromExecution = "复制自{$lang->execution->common} %s"; $lang->execution->cancelCopy = '取消复制'; $lang->execution->byPeriod = '按时间段'; $lang->execution->byUser = '按用户'; diff --git a/module/execution/view/managemembers.html.php b/module/execution/view/managemembers.html.php index ed523ff266..2982c223de 100644 --- a/module/execution/view/managemembers.html.php +++ b/module/execution/view/managemembers.html.php @@ -26,7 +26,8 @@ execution->selectDeptTitle}'");?> execution->copyTeam?> - execution->copyTeamTitle}'");?> + systemMode == 'new' ? $lang->execution->copyTeamTitle : $lang->execution->copyTitle;?> + diff --git a/module/personnel/control.php b/module/personnel/control.php index 2b33b8cf42..6f1f33c8a8 100644 --- a/module/personnel/control.php +++ b/module/personnel/control.php @@ -190,10 +190,11 @@ class personnel extends control $copyUsers = empty($copyID) ? array() : $this->personnel->getWhitelistAccount($copyID, $copyObjectType); $appendUsers = array_unique($deptUsers + $copyUsers); - $objectName = $this->lang->projectCommon . $this->lang->execution->or . $this->lang->execution->common; - if($objectType == 'program') $objectName = $this->lang->program->common; - if($objectType == 'product') $objectName = $this->lang->productCommon; - if($objectType == 'project') $objectName = $this->lang->projectCommon; + $objectName = $this->lang->execution->common; + if($this->config->systemMode == 'new') $objectName = $this->lang->projectCommon . $this->lang->execution->or . $objectName; + if($objectType == 'program') $objectName = $this->lang->program->common; + if($objectType == 'product') $objectName = $this->lang->productCommon; + if($objectType == 'project') $objectName = $this->lang->projectCommon; $this->lang->personnel->selectObjectTips = sprintf($this->lang->personnel->selectObjectTips, $objectName); $this->view->title = $this->lang->personnel->addWhitelist; From 2c842367ef18b9beaac3d13f3cac442a8c882cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Mon, 23 Aug 2021 15:12:38 +0800 Subject: [PATCH 07/47] * fix for upgrade. --- db/zentao.sql | 60 +++++++++++++++++++++++++++++++++++++ module/common/lang/menu.php | 1 - 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/db/zentao.sql b/db/zentao.sql index 1ffcfa5d74..59071eff29 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -1507,6 +1507,12 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (1,'my','team'), (1,'my','work'), (1,'my','contribute'), +(1,'my','task'), +(1,'my','story'), +(1,'my','bug'), +(1,'my','testtask'), +(1,'my','testcase'), +(1,'my','doc'), (1,'my','changePassword'), (1,'my','deleteContacts'), (1,'my','dynamic'), @@ -1881,6 +1887,12 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (2,'my','team'), (2,'my','work'), (2,'my','contribute'), +(2,'my','task'), +(2,'my','story'), +(2,'my','bug'), +(2,'my','testtask'), +(2,'my','testcase'), +(2,'my','doc'), (2,'my','changePassword'), (2,'my','deleteContacts'), (2,'my','dynamic'), @@ -2077,6 +2089,12 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (3,'my','team'), (3,'my','work'), (3,'my','contribute'), +(3,'my','task'), +(3,'my','story'), +(3,'my','bug'), +(3,'my','testtask'), +(3,'my','testcase'), +(3,'my','doc'), (3,'my','changePassword'), (3,'my','deleteContacts'), (3,'my','dynamic'), @@ -2342,6 +2360,12 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (4,'my','team'), (4,'my','work'), (4,'my','contribute'), +(4,'my','task'), +(4,'my','story'), +(4,'my','bug'), +(4,'my','testtask'), +(4,'my','testcase'), +(4,'my','doc'), (4,'my','changePassword'), (4,'my','deleteContacts'), (4,'my','dynamic'), @@ -2637,6 +2661,12 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (5,'my','team'), (5,'my','work'), (5,'my','contribute'), +(5,'my','task'), +(5,'my','story'), +(5,'my','bug'), +(5,'my','testtask'), +(5,'my','testcase'), +(5,'my','doc'), (5,'my','changePassword'), (5,'my','deleteContacts'), (5,'my','dynamic'), @@ -2951,6 +2981,12 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (6,'my','team'), (6,'my','work'), (6,'my','contribute'), +(6,'my','task'), +(6,'my','story'), +(6,'my','bug'), +(6,'my','testtask'), +(6,'my','testcase'), +(6,'my','doc'), (6,'my','changePassword'), (6,'my','deleteContacts'), (6,'my','dynamic'), @@ -3228,6 +3264,12 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (7,'my','team'), (7,'my','work'), (7,'my','contribute'), +(7,'my','task'), +(7,'my','story'), +(7,'my','bug'), +(7,'my','testtask'), +(7,'my','testcase'), +(7,'my','doc'), (7,'my','changePassword'), (7,'my','deleteContacts'), (7,'my','dynamic'), @@ -3517,6 +3559,12 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (8,'my','team'), (8,'my','work'), (8,'my','contribute'), +(8,'my','task'), +(8,'my','story'), +(8,'my','bug'), +(8,'my','testtask'), +(8,'my','testcase'), +(8,'my','doc'), (8,'my','changePassword'), (8,'my','deleteContacts'), (8,'my','dynamic'), @@ -3801,6 +3849,12 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (9,'my','team'), (9,'my','work'), (9,'my','contribute'), +(9,'my','task'), +(9,'my','story'), +(9,'my','bug'), +(9,'my','testtask'), +(9,'my','testcase'), +(9,'my','doc'), (9,'my','changePassword'), (9,'my','deleteContacts'), (9,'my','dynamic'), @@ -4004,6 +4058,12 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (10,'my','team'), (10,'my','work'), (10,'my','contribute'), +(10,'my','task'), +(10,'my','story'), +(10,'my','bug'), +(10,'my','testtask'), +(10,'my','testcase'), +(10,'my','doc'), (10,'my','changePassword'), (10,'my','dynamic'), (10,'my','editProfile'), diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 9a51beb086..7106e70c76 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -114,7 +114,6 @@ $lang->my->dividerMenu = ',work,dynamic,'; /* Program menu. */ $lang->program->homeMenu = new stdclass(); $lang->program->homeMenu->browse = array('link' => "{$lang->program->list}|program|browse|", 'alias' => 'create,edit'); -$lang->program->homeMenu->kanban = array('link' => "{$lang->program->kanban}|program|kanban|", 'alias' => 'create,edit'); $lang->program->menu = new stdclass(); $lang->program->menu->product = array('link' => "{$lang->product->common}|program|product|programID=%s", 'alias' => 'view'); From 4eb57d620764b192709a26abe3e3a02948bd9a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Mon, 23 Aug 2021 15:12:57 +0800 Subject: [PATCH 08/47] * code for bug #14540. --- module/program/model.php | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/module/program/model.php b/module/program/model.php index 9a257bd36f..a465490ad7 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -463,7 +463,15 @@ class programModel extends model $this->loadModel('personnel')->updateWhitelist($whitelist, 'program', $programID); if($program->acl != 'open') $this->loadModel('user')->updateUserView($programID, 'program'); - if($oldProgram->parent != $program->parent) $this->processNode($programID, $program->parent, $oldProgram->path, $oldProgram->grade); + if($oldProgram->parent != $program->parent) + { + $this->processNode($programID, $program->parent, $oldProgram->path, $oldProgram->grade); + + /* Move product to new top program. */ + $oldTopProgram = $this->getTopByPath($oldProgram->path); + $newTopProgram = $this->getTopByID($programID); + if($oldTopProgram != $newTopProgram) $this->dao->update(TABLE_PRODUCT)->set('program')->eq($newTopProgram)->where('program')->eq($oldTopProgram)->exec(); + } return common::createChanges($oldProgram, $program); } @@ -603,8 +611,20 @@ class programModel extends model $program = $this->getByID($programID); if(empty($program)) return 0; - $path = explode(',', trim($program->path, ',')); - return $path[0]; + return $this->getTopByPath($program->path); + } + + /** + * get top program by path. + * + * @param string $path + * @access public + * @return string + */ + public function getTopByPath($path) + { + $paths = explode(',', trim($path, ',')); + return $paths[0]; } /** From 4e0cd5a9650c5c067c3ae4246d9150092fc8eadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Mon, 23 Aug 2021 15:46:34 +0800 Subject: [PATCH 09/47] * fix bug #14540. --- module/program/control.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module/program/control.php b/module/program/control.php index 0efabdc13c..c99086e534 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -174,7 +174,10 @@ class program extends control $program = $this->program->getByID($programID); $parentProgram = $program->parent ? $this->program->getByID($program->parent) : ''; $parents = $this->program->getParentPairs(); - unset($parents[$programID]); + + /* Remove children program from parents. */ + $children = $this->dao->select('*')->from(TABLE_PROGRAM)->where('path')->like("%,$programID,%")->fetchPairs('id', 'id'); + foreach($children as $childID) unset($parents[$childID]); $this->view->title = $this->lang->program->edit; $this->view->position[] = $this->lang->program->edit; From 57a253db4fa78daeaa92f6621ae8f18d8385f7cb Mon Sep 17 00:00:00 2001 From: holan20180123 Date: Mon, 23 Aug 2021 15:58:47 +0800 Subject: [PATCH 10/47] * Fix bug #14561. --- module/project/view/managemembers.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/view/managemembers.html.php b/module/project/view/managemembers.html.php index 2522ce46ec..c0fd6f87cf 100644 --- a/module/project/view/managemembers.html.php +++ b/module/project/view/managemembers.html.php @@ -13,7 +13,7 @@
execution->selectDept?> execution->selectDeptTitle}'");?> - + 1):?> execution->copyTeam;?> project->copyTeamTitle}'");?> From 70a08aab08459efb5cfe61ec39c8aa8e69eaf834 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Mon, 23 Aug 2021 16:02:20 +0800 Subject: [PATCH 11/47] * Delete empty three-level navigation when create documents in execution. --- module/doc/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/doc/control.php b/module/doc/control.php index 093eb6e810..1c2b636595 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -316,8 +316,8 @@ class doc extends control $this->app->rawMethod = $objectType; unset($this->lang->doc->menu->product['subMenu']); unset($this->lang->doc->menu->custom['subMenu']); + unset($this->lang->doc->menu->execution['subMenu']); if($this->config->systemMode == 'new') unset($this->lang->doc->menu->project['subMenu']); - if($this->config->systemMode == 'classic') unset($this->lang->doc->menu->execution['subMenu']); } $lib = $this->doc->getLibByID($libID); From 428b401718034cbeee15c3bf4a5130e95f082497 Mon Sep 17 00:00:00 2001 From: Hao Sun Date: Mon, 23 Aug 2021 16:09:19 +0800 Subject: [PATCH 12/47] * bug #14554, fix refresh help app not work. --- module/index/js/index.js | 6 +++--- module/index/view/index.html.php | 8 +++++--- www/js/zui/min.js | 6 +++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/module/index/js/index.js b/module/index/js/index.js index 2cde601312..821a850644 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -17,9 +17,9 @@ { code: 'help', icon: 'icon-help', - url: $helpLink.attr('href'), + url: manualUrl || $helpLink.attr('href'), external: true, - text: $helpLink.text(), + text: manualText || $helpLink.text(), appUrl: config.webRoot + '#app=help' }; var $menuMainNav = $('#menuMainNav').empty(); @@ -400,7 +400,7 @@ } catch(_) { - iframe.src = url || app.url; + iframe.src = url || app.url || iframe.src; } } diff --git a/module/index/view/index.html.php b/module/index/view/index.html.php index 843e542ec1..a7d36a5555 100644 --- a/module/index/view/index.html.php +++ b/module/index/view/index.html.php @@ -14,10 +14,12 @@ include '../../common/view/header.lite.html.php'; $this->app->loadConfig('sso'); if(!empty($config->sso->redirect)) js::set('ssoRedirect', $config->sso->redirect); -js::set('navGroup', $lang->navGroup); -js::set('appsLang', $lang->index->app); +js::set('navGroup', $lang->navGroup); +js::set('appsLang', $lang->index->app); js::set('appsMenuItems', commonModel::getMainNavList($app->rawModule)); -js::set('defaultOpen', $open); +js::set('defaultOpen', $open); +js::set('manualText', $lang->manual); +js::set('manualUrl', ((!empty($config->isINT)) ? $config->manualUrl['int'] : $config->manualUrl['home']) . '&theme=' . $_COOKIE['theme']); ?>