mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Speedup get_system_pkg_version() considering only installed packages
This commit is contained in:
parent
7f21180757
commit
62121148a6
@ -1219,7 +1219,7 @@ function get_system_pkg_version($baseonly = false, $use_cache = true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$info = get_pkg_info($base_pkg, true);
|
||||
$info = get_pkg_info($base_pkg, true, true);
|
||||
|
||||
$pkg_info = array();
|
||||
foreach ($info as $item) {
|
||||
@ -1231,7 +1231,7 @@ function get_system_pkg_version($baseonly = false, $use_cache = true) {
|
||||
|
||||
if (empty($pkg_info) || (!$baseonly && ($pkg_info['version'] ==
|
||||
$pkg_info['installed_version']))) {
|
||||
$info = get_pkg_info($meta_pkg, true);
|
||||
$info = get_pkg_info($meta_pkg, true, true);
|
||||
|
||||
foreach ($info as $item) {
|
||||
if ($item['name'] == $meta_pkg) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user