From dad23d185cbd3204e2601105d37cc854db1159f1 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 15 May 2009 10:53:42 -0500 Subject: [PATCH] quell warning if format parameter isn't passed to opac-search.pl Signed-off-by: Galen Charlton --- opac/opac-search.pl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 7f7734bfc5..2887a5132e 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -644,4 +644,14 @@ if (defined $barshelves) { $template->param( addbarshelvesloop => $barshelves); } -output_html_with_http_headers $cgi, $cookie, $template->output, $content_type; +my $content_type; + +if ($cgi->param('format') && $cgi->param('format') =~ /rss/) { + $content_type = 'rss' +} elsif ($cgi->param('format') && $cgi->param('format') =~ /atom/) { + $content_type = 'atom' +} else { + $content_type = 'html' +} + +output_with_http_headers $cgi, $cookie, $template->output, $content_type; -- 2.20.1