lib/kolab_api_service.php

Aleksander Machniak machniak at kolabsys.com
Fri Mar 27 08:50:08 CET 2015


 lib/kolab_api_service.php |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 81684b443784c7f2adbe964c1eedf599aadcabe9
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Fri Mar 27 03:49:22 2015 -0400

    Fix object type scoring mechanism issue with locales that use non-standard decimal separator, i.e. a comma (#4799)

diff --git a/lib/kolab_api_service.php b/lib/kolab_api_service.php
index e3c66c5..f19486a 100644
--- a/lib/kolab_api_service.php
+++ b/lib/kolab_api_service.php
@@ -197,6 +197,10 @@ abstract class kolab_api_service
 
             $elem_score .= ':' . $elem_keys_score . ':' . $elem_values_score;
 
+            // fix decimal separator for score_compare() and consistent log (#4799)
+            $elem_score = str_replace(',', '.', $elem_score);
+            $delta      = str_replace(',', '.', $delta);
+
             Log::trace("Score for $object_name type " . $elem['name'] . ": $elem_score ($commonalities/$differences/$delta)");
 
             // Compare last and current element (object type) score




More information about the commits mailing list