C4/Search.pm followup auto_truncation 3.0.x cherry-pick
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Mon, 30 Nov 2009 05:54:47 +0000 (06:54 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Thu, 28 Jan 2010 14:11:42 +0000 (15:11 +0100)
Auto_truncation is used even though exact search selected.
This patch removes this side effect

Conflicts solved:
C4/Search.pm
Cherry-picked from 3.0.x :
3287252c0

C4/Search.pm

index be40b1b..5007f23 100644 (file)
@@ -934,10 +934,14 @@ sub buildQuery {
                 }
 
                 if ($auto_truncation){
-                   # join throws an error if there is a leading space
-                   $operand =~ s/^\s+//;
-                  $operand=~join(" ",map{ "$_*" }split (/\s+/,$operand));
-                }
+                                       unless ( $index =~ /(st-|phr|ext)/ ) {
+                                               #FIXME only valid with LTR scripts
+                                               $operand=join(" ",map{ 
+                                                                                               "$_*" 
+                                                                                        }split (/\s+/,$operand));
+                                               warn $operand if $DEBUG;
+                                       }
+                               }
 
                 # Detect Truncation
                 my $truncated_operand;
@@ -1208,7 +1212,12 @@ 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] );
+<<<<<<< HEAD:C4/Search.pm
 
+=======
+               my $biblionumber;
+        
+>>>>>>> C4/Search.pm followup auto_truncation 3.0.x cherry-pick:C4/Search.pm
         if ($bibliotag<10){
             $fw = GetFrameworkCode($marcrecord->field($bibliotag)->data);
         }else{