Browse Source

Bug 24170: Fix sysprefs search result order

The same sysprefs search will not always return the results in the same
order.
If you search for 'd' in the "search system preferences" box
  /cgi-bin/koha/admin/preferences.pl?op=search&searchfield=d
you will see that the modules are not ordered consistently.

This patch makes them display alphabetically

Test plan:
Search the same string several times in the syspref list.
The search result should always be ordered the same way

Signed-off-by: cori <corilynn.arnold@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Jonathan Druart 5 years ago
committed by Martin Renvoize
parent
commit
c926c934ad
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 2
      admin/preferences.pl

2
admin/preferences.pl

@ -229,7 +229,7 @@ sub SearchPrefs {
my %tab_files = _get_pref_files( $input );
our @terms = split( /\s+/, $searchfield );
foreach my $tab_name ( keys %tab_files ) {
foreach my $tab_name ( sort keys %tab_files ) {
# Force list context to remove 'uninitialized value in goto' warn coming from YAML::Syck; note that the other GetTab call is in list context too. The actual cause however is the null value for the pref OpacRenewalBranch in opac.pref
my ($data) = GetTab( $input, $tab_name );
my $title = ( keys( %$data ) )[0];

Loading…
Cancel
Save