From a3e2bfe51bee65c1e1a337877f25990deaa475c5 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 Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize (cherry picked from commit b946e996ff208e71bbfd5cfb7714f9a656065093) Signed-off-by: Fridolin Somers (cherry picked from commit 5a30719f84857832fc737c287173cdaec5fb30e9) Signed-off-by: Lucas Gass --- .../bootstrap/en/modules/opac-opensearch.tt | 47 +++++++++++-------- .../bootstrap/en/modules/opac-results.tt | 6 +-- .../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 b91b6b7a99..bc5ee646be 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 %] -