diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-10-09 09:45:32 -0400 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-10-09 09:45:32 -0400 |
commit | 0071ef193fbcb87ef135cd4a0aeeba03f8522351 (patch) | |
tree | 29e9d9eab3a95b4983f4d5bcdbc8d89e339f9c02 /src/usr/local/www/pkg_mgr.php | |
parent | c215940242b1b36c9b67c7d57c4235f50c478384 (diff) | |
download | pfsense-0071ef193fbcb87ef135cd4a0aeeba03f8522351.zip pfsense-0071ef193fbcb87ef135cd4a0aeeba03f8522351.tar.gz |
Fixed #5290
Diffstat (limited to 'src/usr/local/www/pkg_mgr.php')
-rw-r--r-- | src/usr/local/www/pkg_mgr.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/usr/local/www/pkg_mgr.php b/src/usr/local/www/pkg_mgr.php index 774987f..c6b5811 100644 --- a/src/usr/local/www/pkg_mgr.php +++ b/src/usr/local/www/pkg_mgr.php @@ -160,7 +160,7 @@ if(!$pkg_info || !is_array($pkg_info)):?> // Sort case insensitve (so we get AbCdEf not ACEcdf) usort($pkg_info, 'compareName'); - + foreach($pkg_info as $index): if(get_package_id($index['name']) >= 0 ) { @@ -173,6 +173,17 @@ if(!$pkg_info || !is_array($pkg_info)):?> if ($menu_category != "All" && $index['categories'][0] != $menu_category && !($menu_category == "Other" && !in_array($index['categories'][0], $visible_categories))) { continue; } + + // Get the package basename (because e.g.: sudo is known as pfSense-pkg-sudo) + $basename = str_replace("pfSense-pkg-", "", $index['name']); + + // Check to see if it is already installed + foreach($config['installedpackages']['package'] as $installedpkg) { + if($installedpkg['name'] == $basename) { + continue(2); + } + } + ?> <tr> <td> @@ -195,7 +206,7 @@ if(!$pkg_info || !is_array($pkg_info)):?> </a> --> </td> -<?php +<?php endif; ?> <td> |