From 90f07e0d1c736be25a73cb5d59a45f11ca7272bb Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 6 Aug 2015 16:19:36 -0600 Subject: [PATCH] removed overkill stuff --- classes/controller.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/classes/controller.php b/classes/controller.php index 8bd28bd3..7c76dc61 100644 --- a/classes/controller.php +++ b/classes/controller.php @@ -289,18 +289,17 @@ class AdminController */ protected function taskClearCache() { - $valid_clear_types = ['standard', 'all', 'assets-only', 'images-only', 'cache-only']; - if (!$this->authoriseTask('clear cache', ['admin.cache', 'admin.super'])) { return; } + // get optional cleartype param $clear_type = $this->grav['uri']->param('cleartype'); - if ($clear_type && in_array($clear_type, $valid_clear_types)) { + if ($clear_type) { $clear = $clear_type; } else { - $clear = $valid_clear_types[0]; + $clear = 'standard'; } $results = Cache::clearCache($clear);