(bug #1758) change the position of GetCOinSBiblio()
authorNahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Thu, 5 Feb 2009 13:04:46 +0000 (14:04 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Fri, 6 Mar 2009 10:35:16 +0000 (11:35 +0100)
The last position getting the COinS of a record wasn't possible in all cases.
This patch just get the COinS earlier in the loop.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
opac/opac-search.pl

index fd3d782..fa26b57 100755 (executable)
@@ -432,6 +432,7 @@ for (my $i=0;$i<=@servers;$i++) {
                        }
                }
                foreach (@newresults) {
+                       $_->{'coins'} = GetCOinSBiblio($_->{'biblionumber'});
                        my $clean = $_->{isbn} or next;
                        unless (
                                $clean =~ /\b(\d{13})\b/ or
@@ -441,7 +442,6 @@ for (my $i=0;$i<=@servers;$i++) {
                                next;
                        }
                        $_ ->{'clean_isbn'} = $1;
-            $_->{'coins'} = GetCOinSBiblio($_->{'biblionumber'});
                }
         $total = $total + $results_hashref->{$server}->{"hits"};
         ## If there's just one result, redirect to the detail page