From 9d88867d0fc2c5c71200930d87f2740e09df8d63 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 6 Apr 2008 15:44:48 +0000 Subject: [PATCH] Enforce DOT as decimal separator for Oracle. MDL-11629 ; backported from HEAD --- lib/dmllib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/dmllib.php b/lib/dmllib.php index 677e42770b1..f754f4dc2f3 100644 --- a/lib/dmllib.php +++ b/lib/dmllib.php @@ -2048,6 +2048,10 @@ function configure_dbconnection() { /// NOTE: Not 100% useful because GPC has been addslashed with the setting off /// so IT'S MANDATORY TO ENABLE THIS UNDER php.ini or .htaccess for this DB /// or to turn off magic_quotes to allow Moodle to do it properly + /// Now set the decimal separator to DOT, Moodle & PHP will always send floats to + /// DB using DOTS. Manually introduced floats (if using other characters) must be + /// converted back to DOTs (like gradebook does) + $db->Execute("ALTER SESSION SET NLS_NUMERIC_CHARACTERS='.,'"); break; } /// Finally define dbfamily