Bugzilla – Attachment 91847 Details for
Bug 23388
Make system preferences links
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23388: Sort the tab results when searching
Bug-23388-Sort-the-tab-results-when-searching.patch (text/plain), 1.63 KB, created by
Maryse Simard
on 2019-07-26 21:27:15 UTC
(
hide
)
Description:
Bug 23388: Sort the tab results when searching
Filename:
MIME Type:
Creator:
Maryse Simard
Created:
2019-07-26 21:27:15 UTC
Size:
1.63 KB
patch
obsolete
>From c2ca4b7c364c976e02862f731aaf65e2d726ea47 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 26 Jul 2019 18:53:03 +0000 >Subject: [PATCH] Bug 23388: Sort the tab results when searching > >Before this patch we can get the matching tabs back in any order > >To test: >1 - Search system preferences for 'field' >2 - Refresh the page a few times >3 - Note results are reordered >4 - Apply patch >5 - Refresh the page several times again >6 - Results are consistent > >Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> >--- > admin/preferences.pl | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/admin/preferences.pl b/admin/preferences.pl >index 92c5bbe..1bce61b 100755 >--- a/admin/preferences.pl >+++ b/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]; >@@ -237,7 +237,6 @@ sub SearchPrefs { > $tab = { '' => $tab } if ( ref( $tab ) eq 'ARRAY' ); > > my $matched_groups; >- > while ( my ( $group_title, $contents ) = each %$tab ) { > if ( matches( $group_title, \@terms ) ) { > $matched_groups->{$group_title} = $contents; >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23388
:
91840
|
91841
|
91846
| 91847 |
94368