From 609ae3db841a9e489cf258af7958f869f1615816 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 16 Nov 2023 15:46:47 +0800 Subject: [PATCH] * Fix the bug of doc search. --- module/api/control.php | 2 +- module/doc/control.php | 2 +- module/doc/ui/createbutton.html.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/api/control.php b/module/api/control.php index 2d87abf051..a45279bcef 100755 --- a/module/api/control.php +++ b/module/api/control.php @@ -144,7 +144,7 @@ class api extends control $this->view->objectID = $objectID; $this->view->moduleID = $moduleID; $this->view->version = $version; - $this->view->libTree = $this->doc->getLibTree($libID, $libs, 'api', $moduleID, $objectID, $browseType, $param); + $this->view->libTree = $this->doc->getLibTree($libID, $libs, 'api', $moduleID, $objectID, $browseType, (int)$param); $this->view->users = $this->user->getPairs('noclosed,noletter'); $this->view->objectDropdown = isset($libs[$libID]) ? $this->generateLibsDropMenu($libs[$libID], $release) : ''; $this->view->spaceType = 'api'; diff --git a/module/doc/control.php b/module/doc/control.php index b2d11625e6..5ba12673e9 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -1270,7 +1270,7 @@ class doc extends control $this->view->isFirstLoad = $isFirstLoad; $this->view->param = $queryID; $this->view->users = $this->user->getPairs('noletter'); - $this->view->libTree = $this->doc->getLibTree($libID, $libs, $type, $moduleID, $objectID, $browseType, $param); + $this->view->libTree = $this->doc->getLibTree($libID, $libs, $type, $moduleID, $objectID, $browseType, (int)$param); $this->view->libID = $libID; $this->view->moduleID = $moduleID; $this->view->objectDropdown = $objectDropdown; diff --git a/module/doc/ui/createbutton.html.php b/module/doc/ui/createbutton.html.php index 57044545b8..e3e190c780 100644 --- a/module/doc/ui/createbutton.html.php +++ b/module/doc/ui/createbutton.html.php @@ -12,14 +12,14 @@ namespace zin; $createButton = $emptyCreateBtn = null; $typeID = empty($lib) ? $objectID : zget($lib, (string)$lib->type, 0); -$libType = empty($lib) ? '' : $lib->type; +$createType = empty($lib) ? '' : $lib->type; $templateParam = $this->config->edition == 'max' ? '&from=template' : ''; $buttonItems = array(); foreach($lang->doc->createList as $typeKey => $typeName) { $docType = zget($config->doc->iconList, $typeKey); - $params = "objectType={$libType}&objectID={$typeID}&libID={$libID}&moduleID={$moduleID}&type={$typeKey}"; - if($typeKey == 'template' and $config->edition == 'max') $params = "objectType={$libType}&objectID={$typeID}&libID={$libID}&moduleID={$moduleID}&type=html&from=template"; + $params = "objectType={$createType}&objectID={$typeID}&libID={$libID}&moduleID={$moduleID}&type={$typeKey}"; + if($typeKey == 'template' and $config->edition == 'max') $params = "objectType={$createType}&objectID={$typeID}&libID={$libID}&moduleID={$moduleID}&type=html&from=template"; $buttonItems[] = array (