bug fix 2590 :

seems that when itemtypeimagelocation returns undef, the hash is messed up.
put it at the end of the hash and everything is fine.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
Henri-Damien LAURENT 2008-09-08 17:45:07 +02:00 committed by Galen Charlton
parent d98ed1dde1
commit f55d783c25
2 changed files with 4 additions and 4 deletions

View file

@ -228,12 +228,12 @@ my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes");
if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') { foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
my %row =( number=>$cnt++,
imageurl=> getitemtypeimagelocation( 'intranet', $itemtypes->{$thisitemtype}->{'imageurl'} ),
ccl => $itype_or_itemtype,
code => $thisitemtype,
selected => $selected,
description => $itemtypes->{$thisitemtype}->{'description'},
count5 => $cnt % 4,
imageurl=> getitemtypeimagelocation( 'intranet', $itemtypes->{$thisitemtype}->{'imageurl'} ),
);
$selected = 0 if ($selected) ;
push @itemtypesloop, \%row;
@ -244,12 +244,12 @@ if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') {
for my $thisitemtype (@$advsearchtypes) {
my %row =(
number=>$cnt++,
imageurl=> getitemtypeimagelocation( 'intranet', $thisitemtype->{'imageurl'} ),
ccl => $advanced_search_types,
code => $thisitemtype->{authorised_value},
selected => $selected,
description => $thisitemtype->{'lib'},
count5 => $cnt % 4,
imageurl=> getitemtypeimagelocation( 'intranet', $thisitemtype->{'imageurl'} ),
);
push @itemtypesloop, \%row;
}

View file

@ -138,12 +138,12 @@ my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes");
if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') {
foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
my %row =( number=>$cnt++,
imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ),
ccl => $itype_or_itemtype,
code => $thisitemtype,
selected => $selected,
description => $itemtypes->{$thisitemtype}->{'description'},
count5 => $cnt % 4,
imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ),
);
$selected = 0 if ($selected) ;
push @itemtypesloop, \%row;
@ -154,12 +154,12 @@ if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') {
for my $thisitemtype (@$advsearchtypes) {
my %row =(
number=>$cnt++,
imageurl=> getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ),
ccl => $advanced_search_types,
code => $thisitemtype->{authorised_value},
selected => $selected,
description => $thisitemtype->{'lib'},
count5 => $cnt % 4,
imageurl=> getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ),
);
push @itemtypesloop, \%row;
}