From a014f8a2abace7cb62151c920baf3f3e7397769e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 18 Jun 2018 17:31:27 -0300 Subject: [PATCH] Bug 16111: Fix content type for RSS feed Test plan: GET http://catalogue/cgi-bin/koha/opac-search.pl?idx=kw&q=perl&count=50&sort_by=acqdate_dsc&format=rss2 => Without this patch it returns content type text/html => With this patch it returns text/xml GET http://catalogue/cgi-bin/koha/opac-search.pl?idx=kw&q=perl&count=50&sort_by=acqdate_dsc&format=rss => Without this patch it does not work => With this patch it returns text/xml Bug 16111: Fix atom support Bug 16111: Remove 'rss2' which should be 'rss' or 'atom' Bug 16111: Replace with --- .../bootstrap/en/modules/opac-opensearch.tt | 47 +++++++++++++--------- .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 6 +-- .../bootstrap/en/modules/opac-search-history.tt | 4 +- opac/opac-search.pl | 7 +++- 4 files changed, 37 insertions(+), 27 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt index 52d5dd8df7..1d4280b880 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt @@ -11,20 +11,20 @@ koha opac [% LibraryName | html %] [% KohaAdminEmailAddress | html %] + template="[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?q={searchTerms}&pw={startPage?}&format=rss"/> [% ELSE %] -[% IF ( rss2 ) %] +[% IF ( rss ) %] <![CDATA[[% LibraryName | html %] Search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]]]> - [% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | url %]&format=rss2 - + + [% total | html %] [% offset | html %] @@ -34,12 +34,18 @@ 20 [% END %] [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %] -