summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-04-25 17:24:26 +0000
committerColin Smith <colin@pfsense.org>2005-04-25 17:24:26 +0000
commit5f78ff712209fe8671c719aef2f39ad7c02aecf7 (patch)
tree7a03abcc4f2353d3978ccb0774644086e06cd466 /usr/local
parenta168783d163bf995bb4c49e4f97bd6a8f7a92833 (diff)
downloadpfsense-5f78ff712209fe8671c719aef2f39ad7c02aecf7.zip
pfsense-5f78ff712209fe8671c719aef2f39ad7c02aecf7.tar.gz
Sort installed packages.
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/pkg_mgr_installed.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/usr/local/www/pkg_mgr_installed.php b/usr/local/www/pkg_mgr_installed.php
index aed627e..6a6d8f4 100755
--- a/usr/local/www/pkg_mgr_installed.php
+++ b/usr/local/www/pkg_mgr_installed.php
@@ -65,9 +65,22 @@ include("fbegin.inc");
</tr>
<?php
- $i = 0;
+ $instpkgs = array();
+ foreach($config['installedpackages']['package'] as $instpkg) $instpkgs[] = $instpkg['name'];
+ foreach ($pkg_config['packages']['package'] as $pkg) {
+ if(!in_array($pkg, $instpkgs)) {
+ $pkgs[] = $pkg['name'];
+ }
+ }
if($config['installedpackages']['package'] != "") {
- foreach ($config['installedpackages']['package'] as $pkg) {
+ foreach($config['installedpackages']['package'] as $instpkg) $instpkgs[] = $instpkg['name'];
+ a_sort($instpkgs);
+ foreach ($instpkgs as $index => $pkgname){
+ if(!is_string($pkgname)) {
+ echo "<tr><td colspan=\"3\"><center>There are currently no packages installed.</td></tr>";
+ break;
+ }
+ $pkg = $config['installedpackages']['package'][$index];
if($pkg['name'] <> "") {
?>
<tr valign="top">
@@ -102,11 +115,9 @@ include("fbegin.inc");
</td>
</tr>
<?php
- $i++;
}
}
}
- if($i == 0) echo "<tr><td colspan=\"3\"><center>There are currently no packages installed.</td></tr>";
?>
</table>
</td>
OpenPOWER on IntegriCloud