From 4e86f4cb023e9044d05430742438f189146eb9ed Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Fri, 28 Jul 2023 15:38:52 +0700 Subject: [PATCH] Fix cache for plugin manager --- CHANGELOG.md | 1 + system/controllers/pluginmanager.php | 2 +- version.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 015de9d0..43be8c84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Change registration design Form - Add Setting to disable Voucher - Fix Title for PPPOE plans +- Fix Plugin Cache ## 2023.6.20 - Hide time for Created date. diff --git a/system/controllers/pluginmanager.php b/system/controllers/pluginmanager.php index d160c01f..c3f11a45 100644 --- a/system/controllers/pluginmanager.php +++ b/system/controllers/pluginmanager.php @@ -20,7 +20,7 @@ if ($admin['user_type'] != 'Admin') { } $cache = File::pathFixer('system/cache/plugin_repository.json'); -if (file_exists($cache) && time() - filemtime($cache) > (24 * 60 * 60)) { +if (file_exists($cache) && time() - filemtime($cache) < (24 * 60 * 60)) { $json = json_decode(file_get_contents($cache), true); } else { $data = file_get_contents($plugin_repository); diff --git a/version.json b/version.json index 0503f161..1d34fd01 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "2023.6.20" + "version": "2023.7.28" } \ No newline at end of file