Bug 34961: Add sort parameter to OPAC search results RSS feed link

This patch corrects two RSS links in the OPAC search results template so
that they include the correct parameters, including the descending sort
by acquisition date.

To test, apply the patch and go to the OPAC.

- Perform a catalog search which will return search results.
- Next to the page heading "Your search returned X results" is an RSS
  link. Check the link to confirm that it has all the expected
  parameters:

  opac-search.pl?idx=kw&q=nude&count=50&sort_by=acqdate_dsc&format=rss

- Perform a search which will return no results and check the RSS link
  on that page. It should be the same.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Owen Leonard 2023-09-29 18:33:59 +00:00 committed by Tomas Cohen Arazi
parent f90715782c
commit 1f730fb866
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -68,7 +68,7 @@
<p>
[% IF ( searchdesc ) %]
No results found for that in [% LibraryName | html %] catalog.
<a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;format=rss" aria-label="Subscribe to this search" class="btn btn-link rsssearchlink noprint">
<a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;count=[% countrss |uri %]&amp;sort_by=acqdate_dsc&amp;format=rss" aria-label="Subscribe to this search" class="btn btn-link rsssearchlink noprint">
<i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this search"></i>
</a>
[% ELSE %]
@ -112,7 +112,7 @@
[% IF ( total ) %]
<h1 id="numresults">
Your search returned [% total | html %] results.
<a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;format=rss" class="btn btn-link rsssearchlink noprint" aria-label="Subscribe to this search">
<a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;count=[% countrss |uri %]&amp;sort_by=acqdate_dsc&amp;format=rss" class="btn btn-link rsssearchlink noprint" aria-label="Subscribe to this search">
<i class="fa fa-rss rsssearchicon" aria-hidden="true" title="Subscribe to this search"></i>
</a>
</h1>