Bug 20652: Fix result sorting after search on limit only
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 24 Apr 2018 18:38:41 +0000 (15:38 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Tue, 29 May 2018 12:14:19 +0000 (12:14 +0000)
1 chomp was missing, spaces were replaced with %20
This patch adds extra chomps, but it does not hurt

Test plan:
Advanced Search
Choose an Item type (do not enter any other search limits)
Search
Click on Sort (it doesn't appear to matter what you sort on)

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt

index 4463b66..bb294cd 100644 (file)
 
             [% IF ( searchdesc ) %]
                 [% BLOCK sort_search_query ~%]
-                    [% FOREACH QUERY_INPUT IN QUERY_INPUTS ~%]
+                    [%~ FOREACH QUERY_INPUT IN QUERY_INPUTS ~%]
                         &amp;[% QUERY_INPUT.input_name |html %]=[% QUERY_INPUT.input_value |html %]
-                    [%~ END %]
-                    [% FOREACH LIMIT_INPUT IN LIMIT_INPUTS ~%]
+                    [%~ END ~%]
+                    [%~ FOREACH LIMIT_INPUT IN LIMIT_INPUTS ~%]
                         &amp;[% LIMIT_INPUT.input_name |html %]=[% LIMIT_INPUT.input_value |html %]
-                    [%~ END %]
+                    [%~ END ~%]
                 [%~ END %]
             [% END %]