[Koha-patches] [PATCH] bug fix 2590 :

Joe Atzberger joe.atzberger at liblime.com
Mon Sep 8 18:43:23 CEST 2008


This patch seems to work fine.  Nice catch, Henri.

On Mon, Sep 8, 2008 at 11:45 AM, Henri-Damien LAURENT <
henridamien.laurent at biblibre.com> wrote:

> seems that when itemtypeimagelocation returns undef, the hash is messed up.
> put it at the end of the hash and everything is fine.
> ---
>  catalogue/search.pl |    4 ++--
>  opac/opac-search.pl |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/catalogue/search.pl b/catalogue/search.pl
> index af541d0..13b137b 100755
> --- a/catalogue/search.pl
> +++ b/catalogue/search.pl
> @@ -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;
>     }
> diff --git a/opac/opac-search.pl b/opac/opac-search.pl
> index 5f50861..ddccb84 100755
> --- a/opac/opac-search.pl
> +++ b/opac/opac-search.pl
> @@ -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;
>        }
> --
> 1.5.4.3
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20080908/f6e738c1/attachment-0002.htm>


More information about the Koha-patches mailing list