Bugzilla – Attachment 12726 Details for
Bug 8887
Search preferences: Strange behaviour with exact matches (default instead of custom favicon used, displays to much results)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8887 Search preferences: Strange behaviour with exact matches (default instead of custom favicon used, displays to much results)
Bug-8887-Search-preferences-Strange-behaviour-with.patch (text/plain), 2.17 KB, created by
Mirko Tietgen
on 2012-10-07 19:23:18 UTC
(
hide
)
Description:
Bug 8887 Search preferences: Strange behaviour with exact matches (default instead of custom favicon used, displays to much results)
Filename:
MIME Type:
Creator:
Mirko Tietgen
Created:
2012-10-07 19:23:18 UTC
Size:
2.17 KB
patch
obsolete
>From a1e24d9af42a7e3966c1e8265e5336fe8db0aa9f Mon Sep 17 00:00:00 2001 >From: Marc Veron <veron@veron.ch> >Date: Sun, 7 Oct 2012 19:54:44 +0200 >Subject: [PATCH] Bug 8887 Search preferences: Strange behaviour with exact matches (default instead of custom favicon used, displays to much results) >Content-Type: text/plain; charset="utf-8" > >Removed superfluous test on exact match in preferences.pl (with return straight out the loop) > >Test scenario: > >a) Make sure you have defined a custom favicon using syspref IntranetFavicon >b) In sysprefs, do a search with partioal match (e.g. intranetcolor) >-> Result shows one entry: intranetcolorstylesheet, and favicon (in browser tab) displays as expected. >d) Do an exact search. e.g. intranetcolorstylesheet >-> Result shows all Staff Client preferences. Favicon (in browser tab) falls back to the Koha default icon > >Apply patch, test again. Now d) behaves like b), favicon displays as expected. > >Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> >--- > admin/preferences.pl | 10 ++++------ > 1 files changed, 4 insertions(+), 6 deletions(-) > >diff --git a/admin/preferences.pl b/admin/preferences.pl >index db91e76..09d648f 100755 >--- a/admin/preferences.pl >+++ b/admin/preferences.pl >@@ -216,12 +216,10 @@ sub SearchPrefs { > > foreach my $piece ( @$line ) { > if ( ref( $piece ) eq 'HASH' ) { >- if ( !$piece->{'pref'} ){ next; } >- if ( $piece->{'pref'} =~ /^$searchfield$/i ) { >- my ( undef, $LINES ) = TransformPrefsToHTML( $data, $searchfield ); >- >- return { search_jumped => 1, tab => $tab_name, tab_title => $title, LINES => $LINES }; >- } elsif ( matches( $piece->{'pref'}, \@terms) ) { >+ if ( !$piece->{'pref'} ){ >+ next; >+ } >+ if ( matches( $piece->{'pref'}, \@terms) ) { > $matched = 1; > } elsif ( ref( $piece->{'choices'} ) eq 'HASH' && grep( { $_ && matches( $_, \@terms ) } values( %{ $piece->{'choices'} } ) ) ) { > $matched = 1; >-- >1.7.2.5
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 8887
:
12724
|
12725
|
12726
|
20278
|
20427