Bug 7337 - Followup - Correcting instances of "debar" that crept back in.
[koha.git] / opac / opac-search.pl
index 716b164..aba23a8 100755 (executable)
@@ -388,7 +388,7 @@ my ($error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_
 my @results;
 
 ## I. BUILD THE QUERY
-my $lang = C4::Templates::getlanguagecookie($cgi);
+my $lang = C4::Templates::getlanguage($cgi, 'opac');
 ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type) = buildQuery(\@operators,\@operands,\@indexes,\@limits,\@sort_by, 0, $lang);
 
 sub _input_cgi_parse ($) { 
@@ -506,7 +506,8 @@ for (my $i=0;$i<@servers;$i++) {
                }
                 if (C4::Context->preference('COinSinOPACResults')) {
                    foreach (@newresults) {
-                     $_->{coins} = GetCOinSBiblio($_->{'biblionumber'});
+                      my $record = GetMarcBiblio($_->{'biblionumber'});
+                     $_->{coins} = GetCOinSBiblio($record);
                    }
                 }