followup : auto_truncation 3287252c0
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Fri, 18 Dec 2009 11:24:00 +0000 (12:24 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Thu, 28 Jan 2010 14:11:46 +0000 (15:11 +0100)
truncated words bore a double * which would create an error

Conflicts solved :
C4/Search.pm

C4/Search.pm

index bdf1434..47ac7a3 100644 (file)
@@ -1139,7 +1139,13 @@ sub buildQuery {
                 }
 
                 if ($auto_truncation){
-                                       $operand=~join(" ",map{ "$_*" }split (/\s+/,$operand));
+                                       unless ( $index =~ /(st-|phr|ext)/ ) {
+                                               #FIXME only valid with LTR scripts
+                                               $operand=join(" ",map{ 
+                                                                                       (index($_,"*")>0?"$_":"$_*")
+                                                                                        }split (/\s+/,$operand));
+                                               warn $operand if $DEBUG;
+                                       }
                                }
 
                 # Detect Truncation