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 1/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E7=BC=93=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 216d053fe..8ef724f4c 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"); -- Gitee From d2c5dfbf0f12813b2c282a4006bf00a738351706 Mon Sep 17 00:00:00 2001 From: LessCodeToDoMore <2506505996@qq.com> Date: Wed, 7 Nov 2018 19:51:32 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Ajax.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/admin/controller/Ajax.php b/application/admin/controller/Ajax.php index 1bf0fe8fe..0a7a3b466 100644 --- a/application/admin/controller/Ajax.php +++ b/application/admin/controller/Ajax.php @@ -146,8 +146,8 @@ class Ajax extends Backend //操作的数据表 $table = $this->request->post("table"); //排序的方式 - $orderway = $this->request->post("orderway", 'strtolower'); - $orderway = $orderway == 'asc' ? 'ASC' : 'DESC'; + $orderway = $this->request->post("orderway"); + $orderway = strtolower($orderway) == 'asc' ? 'ASC' : 'DESC'; $sour = $weighdata = []; $ids = explode(',', $ids); $prikey = 'id'; -- Gitee From 307ed3d7896b40e006b429bd0a5d505498f79d2a Mon Sep 17 00:00:00 2001 From: LessCodeToDoMore <2506505996@qq.com> Date: Wed, 7 Nov 2018 20:02:04 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Ajax.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/admin/controller/Ajax.php b/application/admin/controller/Ajax.php index 0a7a3b466..6676e801f 100644 --- a/application/admin/controller/Ajax.php +++ b/application/admin/controller/Ajax.php @@ -146,8 +146,8 @@ class Ajax extends Backend //操作的数据表 $table = $this->request->post("table"); //排序的方式 - $orderway = $this->request->post("orderway"); - $orderway = strtolower($orderway) == 'asc' ? 'ASC' : 'DESC'; + $orderway = $this->request->post("orderway", "", "strtolower"); + $orderway = $orderway == 'asc' ? 'ASC' : 'DESC'; $sour = $weighdata = []; $ids = explode(',', $ids); $prikey = 'id'; -- Gitee From 2d4a8a3ec81072a21bee68ff27b495e07e05cf9c Mon Sep 17 00:00:00 2001 From: LessCodeToDoMore <2506505996@qq.com> Date: Wed, 7 Nov 2018 20:07:43 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/admin/controller/Ajax.php b/application/admin/controller/Ajax.php index 6676e801f..649cc41de 100644 --- a/application/admin/controller/Ajax.php +++ b/application/admin/controller/Ajax.php @@ -146,7 +146,7 @@ class Ajax extends Backend //操作的数据表 $table = $this->request->post("table"); //排序的方式 - $orderway = $this->request->post("orderway", "", "strtolower"); + $orderway = $this->request->post("orderway", "", 'strtolower'); $orderway = $orderway == 'asc' ? 'ASC' : 'DESC'; $sour = $weighdata = []; $ids = explode(',', $ids); -- Gitee