From 4b8770a78aa2719248bb09613bad52a5d2de5fe6 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 1 Nov 2009 22:42:22 +0000 Subject: [PATCH] Added default date format used before login. --- CHANGELOG.txt | 7 ++++++- config.default.php | 3 +++ includes/prefs/userprefs.inc | 5 +++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a31cb13a..9323dbc9 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -27,7 +27,12 @@ $ config.default.php /includes/ui/ui_view.inc # Bugs in function show_users_online in users_db.inc $ /admin/db/users_db.inc - + +01-Nov-2009 Janusz Dobrowolski ++ Added default date format and date separator used before login. +$ /config.default.php + /includes/prefs/userprefs.inc + 30-Oct-2009 Janusz Dobrowolski # Fixed non-default company selection bug on login. $ /includes/session.inc diff --git a/config.default.php b/config.default.php index cfc37170..7238aa9a 100644 --- a/config.default.php +++ b/config.default.php @@ -110,6 +110,9 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ $dateseps = array("/", ".", "-", " "); $thoseps = array(",", ".", " "); $decseps = array(".", ","); + // defalt dateformats and dateseps indexes used before user login + $dflt_date_fmt = 0; + $dflt_date_sep = 0; $pagesizes = array("Letter", "A4"); // default PDF pagesize diff --git a/includes/prefs/userprefs.inc b/includes/prefs/userprefs.inc index c33220cf..49ef0e80 100644 --- a/includes/prefs/userprefs.inc +++ b/includes/prefs/userprefs.inc @@ -40,9 +40,10 @@ class user_prefs { if ($user == null) { // set default values, used before login - global $dflt_lang; + global $dflt_lang, $dflt_date_sep, $dflt_date_fmt; - $this->date_sep = 0; + $this->date_sep = $dflt_date_sep; + $this->date_format = $dflt_date_fmt; $this->tho_sep = 0; $this->dec_sep = 0; $this->language = $dflt_lang; -- 2.30.2