From 494d8f96d2fb35efec684b277e5c6548aeb15ed8 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 10 Jul 2023 14:48:36 +0800 Subject: [PATCH] * Change the judge permission logic. --- module/custom/config/dtable.php | 8 ++------ module/custom/control.php | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/module/custom/config/dtable.php b/module/custom/config/dtable.php index d7d6b89ebe..8f63510f17 100644 --- a/module/custom/config/dtable.php +++ b/module/custom/config/dtable.php @@ -1,11 +1,7 @@ custom->browseStoryConcept->dtable = new stdclass(); - -if(common::hasPriv('custom', 'setDefaultConcept')) -{ - $config->custom->browseStoryConcept->dtable->fieldList['default']['type'] = 'id'; - $config->custom->browseStoryConcept->dtable->fieldList['default']['sortType'] = false; -} +$config->custom->browseStoryConcept->dtable->fieldList['default']['type'] = 'id'; +$config->custom->browseStoryConcept->dtable->fieldList['default']['sortType'] = false; if($config->URAndSR) { diff --git a/module/custom/control.php b/module/custom/control.php index f5170dac71..97b176b9fb 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -442,8 +442,8 @@ class custom extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => true, 'closeModal' => true)); } + if(!common::hasPriv('custom', 'setDefaultConcept')) unset($this->config->custom->browseStoryConcept->dtable->fieldList['default']); $this->view->title = $this->lang->custom->setStoryConcept; - $this->display(); }