[Koha-patches] [PATCH 89/92] followup : auto_truncation 3287252c0

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Tue Dec 22 01:21:22 CET 2009


truncated words bore a double * which would create an error

Conflicts solved :
	C4/Search.pm
---
 C4/Search.pm |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/C4/Search.pm b/C4/Search.pm
index 322db54..5605ede 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -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
-- 
1.6.3.3




More information about the Koha-patches mailing list