From 0fa0c8bb07c80884ac8b79560ba4c4119abfcd5c Mon Sep 17 00:00:00 2001 From: gweltas Date: Mon, 12 Jan 2004 23:41:53 +0000 Subject: Minor corrections of PHP warnings git-svn-id: http://piwigo.org/svn/branches/release-1_3@276 68402e56-0260-453c-a942-63ccdbb3a9ee --- search.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'search.php') diff --git a/search.php b/search.php index d12e8203a..21d5a5fca 100644 --- a/search.php +++ b/search.php @@ -81,6 +81,7 @@ $vtp->setVar( $handle, 'line.name', $lang['search_field_search'].' *' ); $vtp->addSession( $handle, 'text' ); $vtp->setVar( $handle, 'text.size', '40' ); $vtp->setVar( $handle, 'text.name', 'search' ); +if (isset($_POST['search'])) $vtp->setVar( $handle, 'text.value', $_POST['search'] ); $vtp->closeSession( $handle, 'text' ); $vtp->closeSession( $handle, 'line' ); @@ -92,7 +93,7 @@ $vtp->addSession( $handle, 'radio' ); $vtp->setVar( $handle, 'radio.name', 'mode' ); $vtp->setVar( $handle, 'radio.value', 'OR' ); $vtp->setVar( $handle, 'radio.option', $lang['search_mode_or'] ); -if ( $_POST['mode'] == 'OR' or $_POST['mode'] == '' ) +if (isset($_POST['mode']) && ($_POST['mode'] == 'OR' or $_POST['mode'] == '' )) { $vtp->setVar( $handle, 'radio.checked', ' checked="checked"' ); } @@ -102,7 +103,7 @@ $vtp->addSession( $handle, 'radio' ); $vtp->setVar( $handle, 'radio.name', 'mode' ); $vtp->setVar( $handle, 'radio.value', 'AND' ); $vtp->setVar( $handle, 'radio.option', $lang['search_mode_and'] ); -if ( $_POST['mode'] == 'AND' ) +if ( isset($_POST['mode']) && $_POST['mode'] == 'AND' ) { $vtp->setVar( $handle, 'radio.checked', ' checked="checked"' ); } -- cgit v1.2.3