Fix cache for plugin manager

This commit is contained in:
Ibnu Maksum
2023-07-28 15:38:52 +07:00
parent 39d3c683bc
commit 4e86f4cb02
3 changed files with 3 additions and 2 deletions

View File

@ -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);