C4/Search.pm followup auto_truncation
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Mon, 21 Sep 2009 21:04:46 +0000 (23:04 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Mon, 21 Sep 2009 21:09:43 +0000 (23:09 +0200)
Auto_truncation is used even though exact search selected.
This patch removes this side effect

C4/Search.pm

index 353c5ab..809bc87 100644 (file)
@@ -1125,11 +1125,13 @@ sub buildQuery {
                 }
 
                 if ($auto_truncation){
-                                       #FIXME only valid with LTR scripts
-                                       $operand=join(" ",map{ 
-                                                                                       "$_*" 
-                                                                            }split (/\s+/,$operand));
-                       warn $operand if $DEBUG;
+                                       unless ( $index =~ /(st-|phr|ext)/ ) {
+                                               #FIXME only valid with LTR scripts
+                                               $operand=join(" ",map{ 
+                                                                                               "$_*" 
+                                                                                        }split (/\s+/,$operand));
+                                               warn $operand if $DEBUG;
+                                       }
                                }
 
                 # Detect Truncation
@@ -1397,6 +1399,7 @@ sub searchResults {
     # loop through all of the records we've retrieved
     for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) {
         my $marcrecord = MARC::File::USMARC::decode( $marcresults[$i] );
+               my $biblionumber;
         
         if(not $scan){
             if ($bibliotag<10){