Bugzilla – Attachment 145330 Details for
Bug 32639
OpenSearch description format document generates search errors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32639: Send opac-search.osdx without doing an empty search
Bug-32639-Send-opac-searchosdx-without-doing-an-em.patch (text/plain), 1.77 KB, created by
David Cook
on 2023-01-16 06:05:27 UTC
(
hide
)
Description:
Bug 32639: Send opac-search.osdx without doing an empty search
Filename:
MIME Type:
Creator:
David Cook
Created:
2023-01-16 06:05:27 UTC
Size:
1.77 KB
patch
obsolete
>From b0e8ddf48ea1463e83fed5886ad5d7c4ebecb773 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 16 Jan 2023 06:03:13 +0000 >Subject: [PATCH] Bug 32639: Send opac-search.osdx without doing an empty > search > >This patch sends out opac-search.osdx without running the entirety >of opac-search.pl without any search query. > >This prevents unnecessary computations and warnings from appearing >in the logs. > >Test plan: >1. Apply patch >2. Go to >http://kohadev.myDNSname.org:8080/cgi-bin/koha/opac-search.pl?format=opensearchdescription >3. Note that no errors appear in >/var/log/koha/kohadev/plack-opac-error.log >4. Verify that opac-search.pl still works as expected when >doing a search via the web UI >--- > opac/opac-search.pl | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 10dc707a3e..65904676d1 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -142,10 +142,19 @@ if($cgi->cookie("bib_list")){ > > if ($format eq 'rss' or $format eq 'opensearchdescription' or $format eq 'atom') { > $template->param($format => 1); >+ #NOTE: opensearchdescription doesn't actually use timestamp... > $template->param(timestamp => strftime("%Y-%m-%dT%H:%M:%S-00:00", gmtime)) if ($format eq 'atom'); > # FIXME - the timestamp is a hack - the biblio update timestamp should be used for each > # entry, but not sure if that's worth an extra database query for each bib > } >+ >+#NOTE: Return now for 'opensearchdescription' BZ 32639 >+if ( $format && $format eq 'opensearchdescription' ){ >+ my $content_type = $format; >+ output_with_http_headers $cgi, $cookie, $template->output, $content_type; >+ exit; >+} >+ > if (C4::Context->preference("marcflavour") eq "UNIMARC" ) { > $template->param('UNIMARC' => 1); > } >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32639
:
145330
|
145352
|
147208