Skip to content

Commit

Permalink
Fix EZP-24739: ezFind IndexBoost not working in some locales
Browse files Browse the repository at this point in the history
Closes #197
  • Loading branch information
hgiesenow authored and yannickroger committed Sep 15, 2015
1 parent 0f16b90 commit f46a315
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions classes/ezsolrdoc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -155,4 +157,4 @@ function docToXML()
}


?>
?>

0 comments on commit f46a315

Please sign in to comment.