From 9d69979bb9e8498ac1ac6b4d08fb6b3ba9042cdc Mon Sep 17 00:00:00 2001 From: pjmattal Date: Sat, 12 Mar 2005 16:45:06 +0000 Subject: added Simo's orphan package patch (bug #2281) --- web/lang/pkgfuncs_po.inc | 5 +++++ web/lib/pkgfuncs.inc | 21 ++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'web') diff --git a/web/lang/pkgfuncs_po.inc b/web/lang/pkgfuncs_po.inc index 3d31523..2d0b069 100644 --- a/web/lang/pkgfuncs_po.inc +++ b/web/lang/pkgfuncs_po.inc @@ -202,4 +202,9 @@ $_t["en"]["Yes"] = "Yes"; # $_t["fr"]["Yes"] = "--> Traduction française ici. <--"; # $_t["de"]["Yes"] = "--> Deutsche Übersetzung hier. <--"; +$_t["en"]["Orphans"] = "Orphans"; +# $_t["es"]["Orphans"] = "--> Traducción española aquí. <--"; +# $_t["fr"]["Orphans"] = "--> Traduction française ici. <--"; +# $_t["de"]["Orphans"] = "--> Deutsche Übersetzung hier. <--"; + ?> diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index f832111..00831de 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -531,6 +531,11 @@ function pkg_search_page($SID="") { print "\n"; } + print " \n"; + print " \n"; + print "\n"; + print "\n"; print "\n"; @@ -590,7 +595,18 @@ function pkg_search_page($SID="") { } } } - + if ($_REQUEST["do_Orphans"]) { + # List packages that have neither a Maintainer nor AURMaintainer + # + if (!$has_where) { + $q.= "WHERE (AURMaintainerUID = 0 AND "; + $q.= "MaintainerUID = 0) "; + $has_where = 1; + } else { + $q.= "AND (AURMaintainerUID = 0 AND "; + $q.= "MaintainerUID = 0) "; + } + } switch ($_REQUEST["SB"]) { case 'c': $q.= "ORDER BY CategoryID DESC, Name ASC, LocationID ASC "; @@ -708,6 +724,9 @@ function pkg_search_page($SID="") { if ($row["OutOfDate"]) { print ""; } + if ($row["MaintainerUID"]==0 && $row["AURMaintainerUID"]==0) { + print ""; + } print ""; # if ($i == 0) { # $all_ids = $row["ID"]; -- cgit v1.2.3-54-g00ecf