mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
If a lookup fails to pfsense.com and the cache file does not exist, give a correct error.
This commit is contained in:
parent
d65b55aca0
commit
47c44d0ad8
@ -35,11 +35,15 @@ if($pkg_info) {
|
||||
$fout = fopen("{$g['tmp_path']}/pkg_info.cache", "w");
|
||||
fwrite($fout, serialize($pkg_info));
|
||||
fclose($fout);
|
||||
//$pkg_sizes = get_pkg_sizes();
|
||||
//$pkg_sizes = get_pkg_sizes();
|
||||
} else {
|
||||
$using_cache = true;
|
||||
$savemsg = "Unable to retrieve package info from {$g['xmlrpcbaseurl']}. Cached data will be used.";
|
||||
$pkg_info = unserialize(@file_get_contents("{$g['tmp_path']}/pkg_info.cache"));
|
||||
if(file_exists("{$g['tmp_path']}/pkg_info.cache")) {
|
||||
$savemsg = "Unable to retrieve package info from {$g['xmlrpcbaseurl']}. Cached data will be used.";
|
||||
$pkg_info = unserialize(@file_get_contents("{$g['tmp_path']}/pkg_info.cache"));
|
||||
} else {
|
||||
$savemsg = "Unable to communicate to pfSense.com. Please check DNS, default gateway, etc.";
|
||||
}
|
||||
}
|
||||
|
||||
$pgtitle = "System: Package Manager";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user