From c39183c3ee7eb1b127e981d1f023a13fd88cbea9 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 22 Feb 2011 13:06:55 +0100 Subject: Add ability to search for non-out-of-date packages (fixes FS#17896). Signed-off-by: Lukas Fleischer --- web/lib/pkgfuncs.inc | 7 ++++++- web/template/pkg_search_form.php | 19 ++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'web') diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index fd855ac..53868b6 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -491,7 +491,12 @@ function pkg_search_page($SID="") { } if (isset($_GET['outdated'])) { - $q .= "AND OutOfDateTS IS NOT NULL "; + if ($_GET['outdated'] == 'on') { + $q .= "AND OutOfDateTS IS NOT NULL "; + } + elseif ($_GET['outdated'] == 'off') { + $q .= "AND OutOfDateTS IS NULL "; + } } $order = $_GET["SO"] == 'd' ? 'DESC' : 'ASC'; diff --git a/web/template/pkg_search_form.php b/web/template/pkg_search_form.php index fdeb01b..a2b634d 100644 --- a/web/template/pkg_search_form.php +++ b/web/template/pkg_search_form.php @@ -105,11 +105,20 @@
  • - - - - - +
  • -- cgit v1.2.3-70-g09d2