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

Michael Hafen mdhafen at tech.washk12.org
Mon Sep 8 19:37:45 CEST 2008


My solution was to have itemtypeimagelocation return an empty string.
See "[PATCH] bugfix:  need to return something if an itemtype doesn't
have an image" posted Aug 28.


On Mon, 2008-09-08 at 12:43 -0400, Joe Atzberger wrote:
> 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
> 
> 
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches




More information about the Koha-patches mailing list