From 64b243d23a937d0aa93fca5f1f3dc560ff3e286c Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 25 Aug 2006 23:04:56 +0000 Subject: Misc package changes Submitted-by: Daniel Haischt --- usr/local/www/pkg_mgr.php | 36 ++++++++++++++++++++++++------------ usr/local/www/pkg_mgr_install.php | 9 +++++---- usr/local/www/pkg_mgr_installed.php | 7 ++++--- 3 files changed, 33 insertions(+), 19 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/pkg_mgr.php b/usr/local/www/pkg_mgr.php index c82e67f..f9968ef 100755 --- a/usr/local/www/pkg_mgr.php +++ b/usr/local/www/pkg_mgr.php @@ -70,9 +70,16 @@ include("fbegin.inc"); diff --git a/usr/local/www/pkg_mgr_installed.php b/usr/local/www/pkg_mgr_installed.php index 4f6f160..633d5ec 100755 --- a/usr/local/www/pkg_mgr_installed.php +++ b/usr/local/www/pkg_mgr_installed.php @@ -50,9 +50,10 @@ include("head.inc"); -- cgit v1.1
"" ? false : true, "pkg_mgr.php"); - $tab_array[] = array("Packages with no version info", $requested_version == "none" ? true : false, "pkg_mgr.php?ver=none"); + $tab_array[] = array("Available {$version} packages", $requested_version <> "" ? false : true, "pkg_mgr.php"); + $tab_array[] = array("Packages for any platform", $requested_version == "none" ? true : false, "pkg_mgr.php?ver=none"); +/* $tab_array[] = array("Packages with a different version", $requested_version == "other" ? true : false, "pkg_mgr.php?ver=other"); */ $tab_array[] = array("Installed Packages", false, "pkg_mgr_installed.php"); display_top_tabs($tab_array); ?> @@ -110,16 +117,21 @@ include("fbegin.inc"); foreach($pkg_keys as $key) { $index = &$pkg_info[$key]; if(in_array($index['name'], $instpkgs)) continue; - /* do not display packages with no version info if not explicitely requested */ - if (empty($index['required_version']) && - $requested_version <> "none") { continue; } - /* do not display packages for a different platform info if not explicitely requested */ - if($index['required_version'] <> $version && - $requested_version <> "other") { continue; } - if (isset($index['required_version']) && - $requested_version == "none") { continue; } - if($index['required_version'] == $version && - $requested_version == "other") { continue; } + $dot = strpos($index['required_version'], "."); + $index['major_version'] = substr($index['required_version'], 0, $dot); + + if ($version <> "HEAD" && + $index['required_version'] == "HEAD" && + $requested_version <> "other") { continue; } + if (empty($index['required_version']) && + $requested_version <> "none") { continue; } + if($index['major_version'] > $major && + $requested_version <> "other") { continue; } + if(isset($index['major_version']) && + $requested_version == "none") { continue; } + if($index['major_version'] == $major && + $requested_version == "other") { continue; } + ?>
diff --git a/usr/local/www/pkg_mgr_install.php b/usr/local/www/pkg_mgr_install.php index 6424a76..a0da51a 100755 --- a/usr/local/www/pkg_mgr_install.php +++ b/usr/local/www/pkg_mgr_install.php @@ -55,10 +55,11 @@ include("head.inc");