From 51b15bfc30d5f15fe77a09476839df7f3ffb6ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Sat, 14 May 2022 19:51:18 +0800 Subject: [PATCH] Update Module.php --- app/admin/controller/Module.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/admin/controller/Module.php b/app/admin/controller/Module.php index ec8d769fe..e4942348a 100644 --- a/app/admin/controller/Module.php +++ b/app/admin/controller/Module.php @@ -56,10 +56,10 @@ class Module extends Controller public function change() { $data = $this->_vali(['name.require' => '模块名称不能为空!']); - $modules = ModuleService::instance()->online(); + $online = ModuleService::instance()->online(); $locals = ModuleService::instance()->getModules(); - if (isset($modules[$data['name']])) { - $this->module = $modules[$data['name']]; + if (isset($online[$data['name']])) { + $this->module = $online[$data['name']]; $this->current = $locals[$data['name']] ?? []; $pattern = "|^(\d{4})\.(\d{2})\.(\d{2})\.(\d+)$|"; $this->module['change'] = array_reverse($this->module['change']);