@@ -, +, @@ content type - Click the RSS link and confirm that the browser displays a feed with no errors. In Chrome the feed should display a "document tree" view. - Using the browser's developer console, verify that the content-type of the document is defined as "text/xml." - Validate the resulting feed at https://validator.w3.org/feed/ and confirm that it is valid. --- .../bootstrap/en/modules/opac-opensearch.tt | 49 ++-------------------- .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 4 +- opac/opac-search.pl | 12 ++---- 3 files changed, 9 insertions(+), 56 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt @@ -7,20 +7,19 @@ koha opac [% LibraryName |html %] [% KohaAdminEmailAddress |html %] + template="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?q={searchTerms}&pw={startPage?}&format=rss"/> [% ELSE %] -[% IF ( rss2 ) %] <![CDATA[[% LibraryName |html %] Search [% IF ( query_desc ) %]for '[% query_desc |html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc |html %]'[% END %]]]> - [% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&format=rss2 - + [% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&format=rss + [% total %] [% offset %] @@ -62,47 +61,5 @@ [% END %] -[% END %] - -[% IF ( atom ) %] - - [% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&format=atom - [% LibraryName |html %] Search [% IF ( query_desc ) %]for '[% query_desc |html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc |html %]'[% END %] - - [% timestamp %] - - [% LibraryName |html %] - - - [% total %] - [% page %] - [% IF ( results_per_page ) %] - [% results_per_page %] - [% ELSE %] - 20 - [% END %] - - - - - - - - - - [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %] - - [% SEARCH_RESULT.title |html %] - - - [% SEARCH_RESULT.timestamp %] - - - [% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %] - - [% END %] - -[% END %] [% END %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -16,7 +16,7 @@ [% END %] [% END %] - + [% INCLUDE 'bodytag.inc' bodyid='results' bodyclass='scrollto' %] @@ -41,7 +41,7 @@ No results found!

[% IF ( searchdesc ) %] - No results found for that in [% LibraryName %] catalog. Subscribe to this search + No results found for that in [% LibraryName %] catalog. Subscribe to this search [% ELSE %] You did not specify any search criteria. [% END %] --- a/opac/opac-search.pl +++ a/opac/opac-search.pl @@ -90,7 +90,7 @@ my @searchCategories = $cgi->param('searchcat'); my $format = $cgi->param("format") || ''; my $build_grouped_results = C4::Context->preference('OPACGroupResults'); -if ($format =~ /(rss|atom|opensearchdescription)/) { +if ($format =~ /(rss|opensearchdescription)/) { $template_name = 'opac-opensearch.tt'; } elsif (@params && $build_grouped_results) { @@ -126,11 +126,8 @@ if($cgi->cookie("bib_list")){ @cart_list = split(/\//, $cart_list); } -if ($format eq 'rss2' or $format eq 'opensearchdescription' or $format eq 'atom') { +if ($format eq 'rss' or $format eq 'opensearchdescription' ) { $template->param($format => 1); - $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 } if (C4::Context->preference("marcflavour") eq "UNIMARC" ) { $template->param('UNIMARC' => 1); @@ -736,8 +733,7 @@ for (my $i=0;$i<@servers;$i++) { } ## If there's just one result, redirect to the detail page - if ($total == 1 && $format ne 'rss2' - && $format ne 'opensearchdescription' && $format ne 'atom') { + if ($total == 1 && $format ne 'rss' && $format ne 'opensearchdescription' ) { my $biblionumber=$newresults[0]->{biblionumber}; if (C4::Context->preference('BiblioDefaultView') eq 'isbd') { print $cgi->redirect("/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=$biblionumber"); @@ -970,7 +966,7 @@ $template->param( add_to_some_public_shelves => $some_public_shelves, ); -my $content_type = ($format eq 'rss' or $format eq 'atom') ? $format : 'html'; +my $content_type = ( $format eq 'rss' ) ? $format : 'html'; # If GoogleIndicTransliteration system preference is On Set parameter to load Google's javascript in OPAC search screens if (C4::Context->preference('GoogleIndicTransliteration')) { --