From 3d5b735faec49c03c77732c3c21c2f91e59e060c Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 1 Mar 2011 11:42:29 -0600 Subject: Fix PHP notices in pkg_search_form If we were displaying this without coming from a previous query submit, notices were emitted all over the place. Fix them by adding an isset() first to each variable we try to access. Signed-off-by: Dan McGee Signed-off-by: Lukas Fleischer --- web/template/pkg_search_form.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'web') diff --git a/web/template/pkg_search_form.php b/web/template/pkg_search_form.php index 7592b69..896d47f 100644 --- a/web/template/pkg_search_form.php +++ b/web/template/pkg_search_form.php @@ -5,7 +5,7 @@
- " maxlength='35' /> + " maxlength='35' /> @@ -23,7 +23,7 @@ $cat): - if (intval($_GET["C"]) == $id): + if (isset($_REQUEST['C']) && $_REQUEST['C'] == $id): ?> @@ -40,7 +40,7 @@ __('Name, Description'), 'n' => __('Name Only'), 'm' => __('Maintainer'), 's' => __('Submitter')); foreach ($searchby as $k => $v): - if ($_REQUEST['SeB'] == $k): + if (isset($_REQUEST['SeB']) && $_REQUEST['SeB'] == $k): ?> @@ -57,7 +57,7 @@ __('Name'), 'c' => __('Category'), 'v' => __('Votes'), 'w' => __('Voted'), 'o' => __('Notify'), 'm' => __('Maintainer'), 'a' => __('Age')); foreach ($sortby as $k => $v): - if ($_REQUEST['SB'] == $k): + if (isset($_REQUEST['SB']) && $_REQUEST['SB'] == $k): ?> @@ -74,7 +74,7 @@ __('Ascending'), 'd' => __('Descending')); foreach ($orderby as $k => $v): - if ($_REQUEST['SO'] == $k): + if (isset($_REQUEST['SO']) && $_REQUEST['SO'] == $k): ?> @@ -91,7 +91,7 @@ @@ -108,7 +108,7 @@ __('All'), 'on' => __('Flagged'), 'off' => __('Not Flagged')); foreach ($outdated_flags as $k => $v): - if ($_REQUEST['outdated'] == $k): + if (isset($_REQUEST['outdated']) && $_REQUEST['outdated'] == $k): ?> -- cgit v1.2.3-70-g09d2