]> git.koha-community.org Git - koha.git/commit
Bug 28764: Parse direction parameter in public list view
authorNick Clemens <nick@bywatersolutions.com>
Tue, 27 Jul 2021 11:27:21 +0000 (11:27 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 13 Aug 2021 11:48:22 +0000 (07:48 -0400)
commit13c0679fa0ac58cb404bed29f77b512be6cdf08d
tree2d0ab779f63856b290bcf3a70e0bb02dd76c7a7e
parente6d9ff76fe1cb78d0af9330e1095951d4b631a97
Bug 28764: Parse direction parameter in public list view

This patch adds a check for a 'direction' paramter in list sorting.

It maintains the existing syntax for sorting 'sortfield=field:direction'
but adds support for the form used in paginations and more commonly thtoughout
Koha' sortfield=field&direction=direction'

To test:
1 - Create a public list
2 - Add enough items to generate two pages (40 worked for me)
3 - View the list and enforce sorting by date added descending:
    sortfield=dateadded:desc
4 - Note the titles shown
5 - Click to second page using the pagination bar
6 - Note the same titles are shown, in a reversed order
7 - Apply patch
8 - repeat 305
9 - Second page is sorted correctly!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
opac/opac-shelves.pl