Bug 3602: Fixes a log error for opac-search.pl if expanded_options is not defined.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
Garry Collum 2009-09-12 12:27:18 -04:00 committed by Galen Charlton
parent 68bfc64972
commit 311a4b7967
1 changed files with 5 additions and 4 deletions

View File

@ -219,10 +219,11 @@ if ( $template_type && $template_type eq 'advsearch' ) {
$template->param( expanded_options => C4::Context->preference("expandedSearchOption") );
}
# but let the user override it
if ( ($cgi->param('expanded_options') == 0) || ($cgi->param('expanded_options') == 1 ) ) {
$template->param( expanded_options => $cgi->param('expanded_options'));
}
if (defined $cgi->param('expanded_options')) {
if ( ($cgi->param('expanded_options') == 0) || ($cgi->param('expanded_options') == 1 ) ) {
$template->param( expanded_options => $cgi->param('expanded_options'));
}
}
output_html_with_http_headers $cgi, $cookie, $template->output;
exit;
}