From 1d721555fd0c45f730e0eadaa2a8151ded260596 Mon Sep 17 00:00:00 2001 From: liugang Date: Thu, 23 May 2024 10:04:55 +0800 Subject: [PATCH] * admin: refactor storage of cache. --- module/admin/control.php | 2 +- module/admin/ui/cache.html.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/admin/control.php b/module/admin/control.php index a4e1029b5d..de7e00a6d3 100755 --- a/module/admin/control.php +++ b/module/admin/control.php @@ -591,7 +591,7 @@ class admin extends control if(!extension_loaded('apcu')) return $this->send(array('result' => 'fail', 'message' => $this->lang->admin->apcuNotFound)); $cache = form::data()->get(); - $this->loadModel('setting')->setItem('system.common.cache.enableDAO', $cache->enable); + $this->loadModel('setting')->setItem('system.common.global.cache', json_encode($cache)); return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => true)); } diff --git a/module/admin/ui/cache.html.php b/module/admin/ui/cache.html.php index 3912fc17a5..a0c9f3b102 100644 --- a/module/admin/ui/cache.html.php +++ b/module/admin/ui/cache.html.php @@ -17,9 +17,9 @@ formPanel set::label($lang->admin->daoCache), radioList ( - set::name('enable'), + set::name('dao[enable]'), set::items($lang->admin->cacheStatusList), - set::value($config->cache->enableDAO), + set::value($config->cache->dao->enable), set::inline(true) ) )