]> git.koha-community.org Git - koha.git/commit
Bug 27680: Add support for param[] syntax
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 26 Feb 2021 17:44:23 +0000 (14:44 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 1 Mar 2021 12:50:03 +0000 (13:50 +0100)
commit79064a88639ba725cc898cb940c85ff3fb1d4bee
tree8bc48f0995a52e4476cfdfabb11acc1102d5656a
parentbc23981b46e67a6d9ee91a2065293ac472341bed
Bug 27680: Add support for param[] syntax

While not that common nowadays, it is the syntax PHP uses, and
DataTables also generates such thing in 'traditional' mode. We should
support it as well.

This patch adds support for that. It does so by adding _order_by[] to
the reserved param names, and proper handling on the dbic_merge_sorting
helper.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass!
3- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 27680: (QA follow-up) Minor perlcritic issue

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/REST/Plugin/Query.pm
t/db_dependent/Koha/REST/Plugin/Objects.t