From e9701c67a6753627f04d8bf8c2b285886500044d Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Fri, 3 Apr 2009 12:28:24 +0200 Subject: [PATCH] auto truncation was not used Auto truncation now works on LTR languages For RTL languages(Arab, Hebrew), development should be really improved. Signed-off-by: Galen Charlton Signed-off-by: Henri-Damien LAURENT --- C4/Search.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/C4/Search.pm b/C4/Search.pm index 0dbe8fa888..791dd00005 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -965,6 +965,16 @@ sub buildQuery { # Some helpful index variants my $index_plus = $index . $struct_attr . ":" if $index; my $index_plus_comma = $index . $struct_attr . "," if $index; + if ($auto_truncation){ +# FIXME Auto Truncation is only valid for LTR languages +# use C4::Output; +# use C4::Languages qw(regex_lang_subtags get_bidi); +# $lang = $query->cookie('KohaOpacLanguage') if (defined $query && $query->cookie('KohaOpacLanguage')); +# my $current_lang = regex_lang_subtags($lang); +# my $bidi; +# $bidi = get_bidi($current_lang->{script}) if $current_lang->{script}; + $index_plus_comma .= "rtrn:"; + } # Remove Stopwords if ($remove_stopwords) { -- 2.39.5