From 1be5c6bbfda892fbb78b0a6249eeff1a9a07eb9d Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Wed, 28 Jul 2021 13:20:12 +0800 Subject: [PATCH 1/2] * Fix an error. --- module/doc/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/doc/model.php b/module/doc/model.php index 4c278c3985..595e66e427 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1413,7 +1413,7 @@ class docModel extends model foreach($sourceList as $type => $idList) { $table = $this->config->objectTables[$type]; - $title = in_array($type, array('story', 'bug', 'issue', 'case')) ? 'title' : 'name'; + $title = in_array($type, array('story', 'bug', 'issue', 'case', 'doc')) ? 'title' : 'name'; $name = $this->dao->select('id,' . $title)->from($table)->where('id')->in($idList)->fetchPairs('id'); $sourcePairs[$type] = $name; } From a8e413c921ce3cf39372e5b4db0c5bff5bc3983b Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Wed, 28 Jul 2021 13:22:43 +0800 Subject: [PATCH 2/2] * Fix bugs. --- lib/pager/pager.class.php | 2 +- module/common/lang/menu.php | 6 +++--- module/doc/control.php | 6 ------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/pager/pager.class.php b/lib/pager/pager.class.php index 50e9f01746..1dd0dac22a 100644 --- a/lib/pager/pager.class.php +++ b/lib/pager/pager.class.php @@ -52,7 +52,7 @@ class pager extends basePager { /* 如果设置了请求的原始方法名,则把其赋值给$this->methodName。*/ /* If the original method name of the request is set, assign it to $this->methodName. */ - if(isset($this->app->rawMethod) and $this->app->rawModule != 'doc') + if(isset($this->app->rawMethod)) { $this->methodName = $this->app->rawMethod; } diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 10f33be06f..4cbb6a8d31 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -335,9 +335,9 @@ $lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index"); $lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|browse|browseTyp=byediteddate", 'alias' => 'recent'); $lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|browseTyp=openedbyme", 'alias' => 'my'); $lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect'); -$lang->doc->menu->product = array('link' => "{$lang->doc->product}|doc|tableContents|type=product", 'alias' => 'product'); -if($config->systemMode == 'new') $lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'project'); -if($config->systemMode == 'classic') $lang->doc->menu->execution = array('link' => "{$lang->doc->execution}|doc|tableContents|type=execution", 'alias' => 'execution'); +$lang->doc->menu->product = array('link' => "{$lang->doc->product}|doc|tableContents|type=product", 'alias' => 'showfiles,product'); +if($config->systemMode == 'new') $lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project'); +if($config->systemMode == 'classic') $lang->doc->menu->execution = array('link' => "{$lang->doc->execution}|doc|tableContents|type=execution", 'alias' => 'showfiles,execution'); $lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom'); $lang->doc->dividerMenu = ',product,'; diff --git a/module/doc/control.php b/module/doc/control.php index e7489c8cad..f655c50066 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -776,8 +776,6 @@ class doc extends control $libs = $this->doc->getLibsByObject('product', $objectID); $this->lang->modulePageNav = $this->doc->select($type, $objects, $objectID, $libs); - - $this->app->rawMethod = 'product'; } else if($type == 'project') { @@ -787,8 +785,6 @@ class doc extends control $libs = $this->doc->getLibsByObject('project', $objectID); $this->lang->modulePageNav = $this->doc->select($type, $objects, $objectID, $libs); - - $this->app->rawMethod = 'project'; } else if($type == 'execution') { @@ -797,8 +793,6 @@ class doc extends control $libs = $this->doc->getLibsByObject('execution', $objectID); $this->lang->modulePageNav = $this->doc->select($type, $objects, $objectID, $libs); - - $this->app->rawMethod = 'execution'; } $openApp = strpos('doc,product,project,execution', $this->app->openApp) !== false ? $this->app->openApp : 'doc';