From 15e62620658bfc86b8bde340624f0b49098e0c63 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Mon, 7 Mar 2022 16:42:58 +0800 Subject: [PATCH 1/2] * Fix bug #20329,20350,20366. --- extension/lite/group/ext/lang/resource.php | 2 ++ module/bug/control.php | 2 +- module/doc/lang/zh-cn.php | 2 +- module/doc/view/create.html.php | 12 +++++++++++- module/execution/control.php | 4 ++-- module/project/control.php | 2 +- module/search/model.php | 2 +- 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/extension/lite/group/ext/lang/resource.php b/extension/lite/group/ext/lang/resource.php index 8d647c9d9c..8c9f89ce2b 100644 --- a/extension/lite/group/ext/lang/resource.php +++ b/extension/lite/group/ext/lang/resource.php @@ -636,6 +636,7 @@ $lang->resource->custom->editStoryConcept = 'editStoryConcept'; $lang->resource->custom->browseStoryConcept = 'browseStoryConcept'; $lang->resource->custom->setDefaultConcept = 'setDefaultConcept'; $lang->resource->custom->deleteStoryConcept = 'deleteStoryConcept'; +if($config->edition != 'open') $lang->resource->custom->libreoffice = 'libreOffice'; $lang->custom->methodOrder[5] = 'index'; $lang->custom->methodOrder[10] = 'set'; @@ -651,6 +652,7 @@ $lang->custom->methodOrder[55] = 'editStoryConcept'; $lang->custom->methodOrder[60] = 'browseStoryConcept'; $lang->custom->methodOrder[65] = 'setDefaultConcept'; $lang->custom->methodOrder[70] = 'deleteStoryConcept'; +$lang->custom->methodOrder[75] = 'libreoffice'; $lang->resource->datatable = new stdclass(); $lang->resource->datatable->setGlobal = 'setGlobal'; diff --git a/module/bug/control.php b/module/bug/control.php index 3844061cd9..76f9ee2e47 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1241,7 +1241,7 @@ class bug extends control } else { - $users = $this->user->getPairs('noclosed|nofeedback', $bug->assignedTo); + $users = $this->user->getPairs('noclosed', $bug->assignedTo); } $this->view->title = $this->products[$bug->product] . $this->lang->colon . $this->lang->bug->assignedTo; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index d602806276..d620c0dcc1 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -194,7 +194,7 @@ $lang->doc->noArticle = '暂时没有文章。'; $lang->doc->noLib = '暂时没有文档库。'; $lang->doc->noBook = 'WIKI库还未创建手册,请新建 :)'; $lang->doc->cannotCreateOffice = '

对不起,企业版才能创建%s文档。

试用企业版,请联系我们:4006-8899-23   0532-86893032。

'; -$lang->doc->notSetOffice = "

创建%s文档,需要配置Office转换设置。

"; +$lang->doc->notSetOffice = "创建%s文档,需要配置Office转换设置。"; $lang->doc->noSearchedDoc = '没有搜索到任何文档。'; $lang->doc->noEditedDoc = '您还没有编辑任何文档。'; $lang->doc->noOpenedDoc = '您还没有创建任何文档。'; diff --git a/module/doc/view/create.html.php b/module/doc/view/create.html.php index 95f96bef31..fbd9723d9b 100644 --- a/module/doc/view/create.html.php +++ b/module/doc/view/create.html.php @@ -19,7 +19,17 @@ config->edition != 'open'):?>

- doc->notSetOffice, zget($lang->doc->typeList, $docType), common::hasPriv('custom', 'libreoffice') ? $this->createLink('custom', 'libreoffice') : '###');?> + doc->notSetOffice, zget($lang->doc->typeList, $docType), $this->createLink('custom', 'libreoffice', 'onlybody=yes')); + } + else + { + + printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), '###'); echo $lang->doc->accessDenied; + } + ?>
doc->cannotCreateOffice, zget($lang->doc->typeList, $docType));?>
diff --git a/module/execution/control.php b/module/execution/control.php index ec7ffd8eab..1189c8047c 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2622,7 +2622,7 @@ class execution extends control $this->loadModel('dept'); $execution = $this->execution->getById($executionID); - $users = $this->user->getPairs('noclosed|nodeleted|devfirst|nofeedback', '', $this->config->maxCount); + $users = $this->user->getPairs('noclosed|nodeleted|devfirst', '', $this->config->maxCount); $roles = $this->user->getUserRoles(array_keys($users)); $deptUsers = empty($dept) ? array() : $this->dept->getDeptUserPairs($dept); @@ -2637,7 +2637,7 @@ class execution extends control foreach($members2Import as $member) $appendUsers[$member->account] = $member->account; foreach($deptUsers as $deptAccount => $userName) $appendUsers[$deptAccount] = $deptAccount; - $users = $this->user->getPairs('noclosed|nodeleted|devfirst|nofeedback', $appendUsers, $this->config->maxCount); + $users = $this->user->getPairs('noclosed|nodeleted|devfirst', $appendUsers, $this->config->maxCount); $roles = $this->user->getUserRoles(array_keys($users)); /* Set menu. */ diff --git a/module/project/control.php b/module/project/control.php index 2eb8c75938..8b1292bc0a 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1349,7 +1349,7 @@ class project extends control } $project = $this->project->getById($projectID); - $users = $this->user->getPairs('noclosed|nodeleted|devfirst|nofeedback'); + $users = $this->user->getPairs('noclosed|nodeleted|devfirst'); $roles = $this->user->getUserRoles(array_keys($users)); $deptUsers = $dept === '' ? array() : $this->dept->getDeptUserPairs($dept); $userInfoList = $this->user->getUserDisplayInfos(array_keys($users), $dept); diff --git a/module/search/model.php b/module/search/model.php index b5dca0dc0e..f7ebc34a88 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -706,7 +706,7 @@ class searchModel extends model $index->title = $object->{$fields->title}; $index->addedDate = isset($object->{$fields->addedDate}) ? $object->{$fields->addedDate} : '0000-00-00 00:00:00'; $index->editedDate = isset($object->{$fields->editedDate}) ? $object->{$fields->editedDate} : '0000-00-00 00:00:00'; - $index->vision = $this->config->vision; + $index->vision = isset($object->vision) ? $object->vision : 'rnd'; $index->content = ''; $contentFields = explode(',', $fields->content . ',comment'); From 4c7b17eed26222752cb8a61c00769e7a1a604fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=90=E8=83=A1=E6=88=90?= Date: Mon, 7 Mar 2022 08:47:46 +0000 Subject: [PATCH 2/2] Update create.html.php --- module/doc/view/create.html.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/doc/view/create.html.php b/module/doc/view/create.html.php index fbd9723d9b..7db9fbd853 100644 --- a/module/doc/view/create.html.php +++ b/module/doc/view/create.html.php @@ -26,7 +26,6 @@ } else { - printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), '###'); echo $lang->doc->accessDenied; } ?>