From 244a281a472e864cb0e595915ee343b73016ea86 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 19 May 2022 09:57:00 +0800 Subject: [PATCH] * Finish task #54329. --- db/update17.0.beta1.sql | 2 -- module/custom/control.php | 4 ++-- module/custom/view/set.html.php | 6 +++--- module/story/model.php | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 db/update17.0.beta1.sql diff --git a/db/update17.0.beta1.sql b/db/update17.0.beta1.sql deleted file mode 100644 index 6b2a1656df..0000000000 --- a/db/update17.0.beta1.sql +++ /dev/null @@ -1,2 +0,0 @@ -insert into zt_config(vision, owner, module, `key`, value) select 'rnd', 'system', 'story', 'forceReviewUsers', `value` from zt_config where vision='rnd' and owner='system' and module='story' and `key`='forceReview'; -insert into zt_config(vision, owner, module, `key`, value) select 'lite', 'system', 'story', 'forceReviewUsers', `value` from zt_config where vision='lite' and owner='system' and module='story' and `key`='forceReview'; diff --git a/module/custom/control.php b/module/custom/control.php index 4fd1ba3be8..6ed32f35e7 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -77,7 +77,7 @@ class custom extends control { $this->view->depts = $this->loadModel('dept')->getDeptPairs(); $this->view->forceReviewAll = zget($this->config->$module, 'forceReviewAll', 'false'); - $this->view->forceReviewUsers = zget($this->config->$module, 'forceReviewUsers', ''); + $this->view->forceReview = zget($this->config->$module, 'forceReview', ''); $this->view->forceReviewRoles = zget($this->config->$module, 'forceReviewRoles', ''); $this->view->forceReviewDepts = zget($this->config->$module, 'forceReviewDepts', ''); } @@ -126,7 +126,7 @@ class custom extends control $data = fixer::input('post') ->setDefault('forceReviewAll', 0) ->setDefault('forceReviewDepts', '') - ->join('forceReviewUsers', ',') + ->join('forceReview', ',') ->join('forceReviewRoles', ',') ->join('forceReviewDepts', ',') ->join('forceReviewAll', ',') diff --git a/module/custom/view/set.html.php b/module/custom/view/set.html.php index b6a328bfed..4e1a38ed76 100644 --- a/module/custom/view/set.html.php +++ b/module/custom/view/set.html.php @@ -112,7 +112,7 @@ EOT; custom->forceReview . $space . $lang->custom->account;?> - + $lang->custom->allUsers), $forceReviewAll);?> @@ -290,11 +290,11 @@ $(function() $('#deptBox').toggleClass('hidden', checked); if(checked) { - $('#forceReviewUsers').val('').attr('disabled', 'disabled').trigger('chosen:updated'); + $('#forceReview').val('').attr('disabled', 'disabled').trigger('chosen:updated'); } else { - $('#forceReviewUsers').removeAttr('disabled', 'disabled').trigger('chosen:updated'); + $('#forceReview').removeAttr('disabled', 'disabled').trigger('chosen:updated'); } } }) diff --git a/module/story/model.php b/module/story/model.php index 297354a178..83dda1b077 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -4323,7 +4323,7 @@ class storyModel extends model if(isset($this->config->story->forceReviewAll) and $this->config->story->forceReviewAll) return true; $forceUsers = ''; - if(!empty($this->config->story->forceReviewUsers)) $forceUsers = $this->config->story->forceReviewUsers; + if(!empty($this->config->story->forceReview)) $forceUsers = $this->config->story->forceReview; if(!empty($this->config->story->forceReviewRoles) or !empty($this->config->story->forceReviewDepts)) {