From 7459f434637327221ec72f6fa8a379648b96e755 Mon Sep 17 00:00:00 2001 From: Luca Date: Wed, 25 Jan 2023 19:29:38 +0100 Subject: [PATCH] =?UTF-8?q?Aggiunta=20possibilit=C3=A0=20di=20far=20scader?= =?UTF-8?q?e=20la=20cache=20degli=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/stato_servizi/actions.php | 15 +++++++ modules/stato_servizi/elenco-hooks.php | 55 +++++++++++++++++++++++--- src/Update.php | 2 +- 3 files changed, 65 insertions(+), 7 deletions(-) diff --git a/modules/stato_servizi/actions.php b/modules/stato_servizi/actions.php index 27aa7a636..c5f233652 100755 --- a/modules/stato_servizi/actions.php +++ b/modules/stato_servizi/actions.php @@ -24,6 +24,7 @@ use Models\Cache; use Models\Module; use Models\Plugin; use Util\FileSystem; +use Carbon\Carbon; $id = post('id'); @@ -267,6 +268,20 @@ switch (filter('op')) { break; + case 'svuota-cache-hooks': + + // Svuota cache hooks + $database->table('zz_cache') + ->update(['expire_at' => Carbon::now()->subMinutes(1)]); + + // Messaggio informativo + flash()->info(tr('Cache hooks svuotata!', [])); + + + echo json_encode([]); + break; + + case 'disabilita-hook': $id = filter('id'); diff --git a/modules/stato_servizi/elenco-hooks.php b/modules/stato_servizi/elenco-hooks.php index dc591100f..6cb80447c 100644 --- a/modules/stato_servizi/elenco-hooks.php +++ b/modules/stato_servizi/elenco-hooks.php @@ -89,14 +89,57 @@ foreach ($gruppi as $modulo => $hooks) { '; } - echo ' - '; + + } + +echo '

 

+ '; + +echo ' +'; + + echo '