Bugzilla – Attachment 61976 Details for
Bug 18400
Noisy warns in opac-search.pl during itemtype sorting
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18400 - Noisy warns in opac-search.pl during itemtype sorting
Bug-18400---Noisy-warns-in-opac-searchpl-during-it.patch (text/plain), 1.96 KB, created by
Nick Clemens (kidclamp)
on 2017-04-07 16:53:11 UTC
(
hide
)
Description:
Bug 18400 - Noisy warns in opac-search.pl during itemtype sorting
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-04-07 16:53:11 UTC
Size:
1.96 KB
patch
obsolete
>From 4653527add6d5e5b7acaeec4413d66695fde37f1 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 7 Apr 2017 12:51:49 -0400 >Subject: [PATCH] Bug 18400 - Noisy warns in opac-search.pl during itemtype > sorting > >To fix the warns we use a copy of itemtypes which is not touched by >other code > >To test: >Apply patches >Ensure search still works >--- > opac/opac-search.pl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index a84e9d3..ee0195d 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -229,6 +229,8 @@ foreach my $itemtype ( keys %{$itemtypes} ) { > $itemtypes->{$itemtype}->{translated_description} = > ( $translated_description ) ? $translated_description : $itemtypes->{$itemtype}->{description}; > } >+my $itemtypes_copy = { %$itemtypes }; #Sometime itemtypes can be corrupted in advanced_srch_type loop >+ #Making a copy ensure it is clean > # Load the Type stuff without search categories for facets > my $itemtypes_nocategory = GetItemTypes; > # the index parameter is different for item-level itemtypes >@@ -256,7 +258,8 @@ foreach my $advanced_srch_type (@advanced_search_types) { > if ($advanced_srch_type eq 'itemtypes') { > # itemtype is a special case, since it's not defined in authorized values > my @itypesloop; >- foreach my $thisitemtype ( sort {$itemtypes->{$a}->{translated_description} cmp $itemtypes->{$b}->{translated_description} } keys %$itemtypes ) { >+ my @sorted_itemtypes = ( sort {$itemtypes->{$a}->{translated_description} cmp $itemtypes->{$b}->{translated_description} } keys %$itemtypes_copy ); >+ foreach my $thisitemtype ( @sorted_itemtypes ) { > next if $hidingrules->{itype} && any { $_ eq $thisitemtype } @{$hidingrules->{itype}}; > next if $hidingrules->{itemtype} && any { $_ eq $thisitemtype } @{$hidingrules->{itemtype}}; > my %row =( number=>$cnt++, >-- >2.1.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 18400
:
61976
|
62224
|
62232
|
63416
|
63417
|
64718