mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-02 17:24:41 +02:00
check if connection error
This commit is contained in:
parent
ee2e67f490
commit
4bbb98fb98
2 changed files with 24 additions and 10 deletions
|
@ -21,7 +21,12 @@ if ($admin['user_type'] != 'Admin') {
|
|||
|
||||
$cache = File::pathFixer('system/cache/plugin_repository.json');
|
||||
if (file_exists($cache) && time() - filemtime($cache) < (24 * 60 * 60)) {
|
||||
$json = json_decode(file_get_contents($cache), true);
|
||||
$txt = file_get_contents($cache);
|
||||
$json = json_decode($txt, true);
|
||||
if(empty($json['plugins']) && empty($json['payment_gateway'])){
|
||||
unlink($cache);
|
||||
r2(U . 'dashboard', 'd', $txt);
|
||||
}
|
||||
} else {
|
||||
$data = Http::getData($plugin_repository);
|
||||
file_put_contents($cache, $data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue