Hi,
Final fixing ok for V1.8.0.
If you want to try the fixing before V1.8.0 is deployed :
in /view/js/projector.js, replace function saveBrowserLocaleToSession() with
function saveBrowserLocaleToSession() {
browserLocale=dojo.locale;
dojo.xhrPost({
url: "../tool/saveDataToSession.php?id=browserLocale&value=" + browserLocale,
load: function(data,args) { }
});
var date = new Date(2000, 11, 31, 0, 0, 0, 0);
var formatted=dojo.date.locale.format(date);
var format="YYYYMMDD";
if (formatted.substr(0,2)=='31') {
format='DDMMYYYY';
} else if (formatted.substr(0,2)=='12') {
format='MMDDYYYY';
}
dojo.xhrPost({
url: "../tool/saveDataToSession.php?id=browserLocaleDateFormat&value=" + format,
load: function(data,args) { }
});
}
replace function setupLocale() in /tool/projector.php with
function setupLocale () {
global $currentLocale, $paramDefaultLocale, $browserLocale, $browserLocaleDateFormat;
if (isset($_SESSION['currentLocale'])) {
// First fetch in Session (filled in at login depending on user parameter)
$currentLocale=$_SESSION['currentLocale'];
} else if (isset($_REQUEST['currentLocale'])) {
// Second fetch from request (for screens before user id identified)
$currentLocale=$_REQUEST['currentLocale'];
$_SESSION['currentLocale']=$currentLocale;
$i18nMessages=null; // Should be null at this moment, just to be sure
} else {
// none of the above methods worked : get the default one form parameter file
$currentLocale=$paramDefaultLocale;
}
if (isset($_SESSION['browserLocale'])) {
$browserLocale=$_SESSION['browserLocale'];
} else {
$browserLocale=$currentLocale;
}
$_SESSION['lang']=$currentLocale; // Must be kept for user parameter screen initialization
if (isset($_SESSION['browserLocaleDateFormat'])) {
$browserLocaleDateFormat=$_SESSION['browserLocaleDateFormat'];
} else {
$browserLocale='YYYYMMDD';
}
}
and replace function htmlFormatDate($val) in /tool/html.php
function htmlFormatDate($val) {
global $browserLocaleDateFormat;
if (strlen($val)!=10) {
return $val;
}
if ($browserLocaleDateFormat=='MMDDYYYY') {
return substr($val,5,2) . "/" . substr($val,8,2) . "/" . substr($val,0,4);
} else if ($browserLocaleDateFormat=='DDMMYYYY') {
return substr($val,8,2) . "/" . substr($val,5,2) . "/" . substr($val,0,4);
} else {
return $val;
}
}
Don't forget to refresh browser cache and test : it sould be better !
Regards.