diff --git a/config-dist.php b/config-dist.php index 86d15ea..7902299 100644 --- a/config-dist.php +++ b/config-dist.php @@ -282,6 +282,16 @@ $CFG->admin = 'admin'; // // NOTE: if you are using custompix in your theme, see /fixpix.php. +// If using Oracle, specify the characters to use as the decimal separator and +// group separator. The decimal separator separates the integer portion of a +// number from the decimal portion. The group separator separates integer groups +// (that is, thousands, millions, billions, and so on). If not specified, Moodle +// will use '.' as the decimal separator and ',' as the group separator by default. +// +// See http://download.oracle.com/docs/cd/B14117_01/server.101/b10755/initparams130.htm +// for additional details. +// $CFG->oraclenlsnumchars = '.,'; + //========================================================================= // ALL DONE! To continue installation, visit your main page with a browser //========================================================================= diff --git a/lib/dmllib.php b/lib/dmllib.php index baa96be..242e9c6 100644 --- a/lib/dmllib.php +++ b/lib/dmllib.php @@ -1957,6 +1957,10 @@ function configure_dbconnection() { /// No need to set charset. It must be specified by the NLS_LANG env. variable /// Enable sybase quotes, so addslashes and stripslashes will use "'" ini_set('magic_quotes_sybase', '1'); + /// MDL-11629 + $db->Execute("ALTER SESSION SET NLS_NUMERIC_CHARACTERS='" . + (isset($CFG->oraclenlsnumchars) ? + $CFG->oraclenlsnumchars : '.,') . "'"); /// 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