From 7dc185fb5fee4cb45a858c2b487d8c20de599fc5 Mon Sep 17 00:00:00 2001 From: LessCodeToDoMore <2506505996@qq.com> Date: Tue, 6 Nov 2018 19:10:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B8=85=E9=99=A4=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Ajax.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/application/admin/controller/Ajax.php b/application/admin/controller/Ajax.php index 216d053f..8ef724f4 100644 --- a/application/admin/controller/Ajax.php +++ b/application/admin/controller/Ajax.php @@ -198,19 +198,22 @@ class Ajax extends Backend { $type = $this->request->request("type"); switch ($type) { - case 'content' || 'all': + case 'content': rmdirs(CACHE_PATH, false); Cache::clear(); - if ($type == 'content') - break; - case 'template' || 'all': + break; + case 'template': rmdirs(TEMP_PATH, false); - if ($type == 'template') - break; - case 'addons' || 'all': + break; + case 'addons': Service::refresh(); - if ($type == 'addons') - break; + break; + case 'all': + rmdirs(CACHE_PATH, false); + Cache::clear(); + rmdirs(TEMP_PATH, false); + Service::refresh(); + break; } \think\Hook::listen("wipecache_after");