Simplify package update status retrieval

This commit is contained in:
Ely Deckers 2022-02-16 15:10:09 +01:00
parent cb11d68518
commit 1229bf6370

View File

@ -1151,20 +1151,15 @@ function pfz_dhcp($section, $valuekey=""){
} }
} }
//Packages // Packages
function pfz_packages_uptodate(){ function pfz_packages_uptodate()
require_once("pkg-utils.inc"); {
$installed_packages = get_pkg_info('all', false, true); require_once("pkg-utils.inc");
$installed_packages = get_pkg_info("all", false, true);
$ret = 0;
foreach ($installed_packages as $package){ return count(array_filter(
if ($package['version']!=$package['installed_version']){ $installed_packages,
$ret ++; fn($p) => $p["version"] != $p["installed_version"]));
}
}
return $ret;
} }
// System Information // System Information