Permalink
Browse files

Enforce DOT as decimal separator for Oracle. MDL-11629

  • Loading branch information...
1 parent 8cfb086 commit 3a6a84b79bd0f4f53dd771e4ff5da2fb18ec4467 stronk7 committed Apr 6, 2008
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/dmllib.php
View
@@ -2266,6 +2266,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;
}
}

0 comments on commit 3a6a84b

Please sign in to comment.