From f46a315f2fa117e79611f399de1a70e3bc286cc9 Mon Sep 17 00:00:00 2001 From: Hannes Giesenow Date: Thu, 27 Aug 2015 14:10:45 +0200 Subject: [PATCH] Fix EZP-24739: ezFind IndexBoost not working in some locales Closes #197 --- classes/ezsolrdoc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/classes/ezsolrdoc.php b/classes/ezsolrdoc.php index 7f7fb5b1..79432913 100644 --- a/classes/ezsolrdoc.php +++ b/classes/ezsolrdoc.php @@ -118,7 +118,9 @@ function docToXML() if ($this->DocBoost !== null && is_numeric( $this->DocBoost ) ) { - $this->DomRootElement->setAttribute( 'boost', $this->DocBoost ); + // This will force the '.' as decimal separator and not depend on the locale + $docBoost = sprintf('%F',$this->DocBoost); + $this->DomRootElement->setAttribute( 'boost', $docBoost ); } foreach ($this->Doc as $name => $field) { @@ -155,4 +157,4 @@ function docToXML() } -?> \ No newline at end of file +?>