summaryrefslogtreecommitdiffstats
path: root/usr/local/www/pkg_mgr.php
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-04-25 14:18:54 +0000
committerColin Smith <colin@pfsense.org>2005-04-25 14:18:54 +0000
commita168783d163bf995bb4c49e4f97bd6a8f7a92833 (patch)
treeb390bc81613313cf90fc27e60c622097fd27f0ef /usr/local/www/pkg_mgr.php
parent0db271e09aaffd33c624c625ff0a973b8c1bc9f5 (diff)
downloadpfsense-a168783d163bf995bb4c49e4f97bd6a8f7a92833.zip
pfsense-a168783d163bf995bb4c49e4f97bd6a8f7a92833.tar.gz
* Use a_sort to preserve key values.
* Fix package installation ($index instead of $i). * Only loop through $config once to get an array of installed packages.
Diffstat (limited to 'usr/local/www/pkg_mgr.php')
-rwxr-xr-xusr/local/www/pkg_mgr.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr/local/www/pkg_mgr.php b/usr/local/www/pkg_mgr.php
index 08135aa..ec6d480 100755
--- a/usr/local/www/pkg_mgr.php
+++ b/usr/local/www/pkg_mgr.php
@@ -106,30 +106,30 @@ if(!$pkg_config['packages']) {
$pkgs[] = $pkg['name'];
}
}
- sort($pkgs);
- foreach($pkgs as $pkg) {
+ asort($pkgs);
+ foreach($pkgs as $index => $pkg) {
if(!is_string($instpkgs[0])) {
echo "<tr><td colspan=\"3\"><center>There are currently no available packages for installation.</td></tr>";
}
?>
<tr valign="top">
<td class="listlr">
- <A target="_new" href="<?= $pkg['website'] ?>"><?= $pkg['name'] ?></a>
+ <A target="_new" href="<?= $pkg_config['packages'][$index]['website'] ?>"><?= $pkg_config['packages'][$index]['name'] ?></a>
</td>
<td class="listlr">
- <?= $pkg['category'] ?>
+ <?= $pkg_config['packages'][$index]['category'] ?>
</td>
<td class="listlr">
- <?= $pkg['status'] ?>
+ <?= $pkg_config['packages'][$index]['status'] ?>
<br>
- <?= $pkg['version'] ?>
+ <?= $pkg_config['packages'][$index]['version'] ?>
</td>
<td class="listbg">
<font color="#FFFFFFF">
- <?= $pkg['descr'] ?>
+ <?= $pkg_config['packages'][$index]['descr'] ?>
</td>
<td valign="middle" class="list" nowrap>
- <a onclick="return confirm('Do you really want to install this package?')" href="pkg_mgr_install.php?id=<?=$i;?>"><img src="plus.gif" width="17" height="17" border="0"></a>
+ <a onclick="return confirm('Do you really want to install this package?')" href="pkg_mgr_install.php?id=<?=$index;?>"><img src="plus.gif" width="17" height="17" border="0"></a>
</td>
</tr>
<?php
OpenPOWER on IntegriCloud