diff options
author | gweltas <gweltas@piwigo.org> | 2004-01-12 23:41:53 +0000 |
---|---|---|
committer | gweltas <gweltas@piwigo.org> | 2004-01-12 23:41:53 +0000 |
commit | 0fa0c8bb07c80884ac8b79560ba4c4119abfcd5c (patch) | |
tree | 520a704560749c2e5a981092bae7db99e34cf27b /search.php | |
parent | 7b8d0b8dd8d3f5fa25dedaadb922525e7c95ee3b (diff) |
Minor corrections of PHP warnings
git-svn-id: http://piwigo.org/svn/branches/release-1_3@276 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | search.php | 5 |
1 files changed, 3 insertions, 2 deletions
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"' ); } |