Added default date format used before login.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 1 Nov 2009 22:42:22 +0000 (22:42 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 1 Nov 2009 22:42:22 +0000 (22:42 +0000)
CHANGELOG.txt
config.default.php
includes/prefs/userprefs.inc

index a31cb13ae36f9564f4e4ab2cc31f6c080789350a..9323dbc9ce39bbf59de9cd56c661072d42b3bffb 100644 (file)
@@ -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
index cfc371708e0dbc6fb7942a21ede0dd04a12b98d3..7238aa9a6999bbad99a2b091d842b02cf143cb4d 100644 (file)
@@ -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
 
index c33220cf84fa76ed473063d5b847a45815a193b7..49ef0e80a3277c6ef5ed52ebac1c91d73678085e 100644 (file)
@@ -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;