Support for new packaged extensions system.
[fa-stable.git] / includes / prefs / userprefs.inc
index c33220cf84fa76ed473063d5b847a45815a193b7..50fa0a8811e1b5cf3a32a220dcae1179ff0a1746 100644 (file)
@@ -40,11 +40,13 @@ 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->price_dec = 2;
                        $this->language = $dflt_lang;
                        $this->theme = 'default';
                        
@@ -82,7 +84,32 @@ class user_prefs
                        }
                }
        }
-
+       
+       function get_all()
+       {
+                       return array(
+                       'language' => $this->language,
+                       'qty_dec' => $this->qty_dec,
+                       'prices_dec' => $this->price_dec,
+                       'rates_dec' => $this->exrate_dec,
+                       'percent_dec' => $this->percent_dec,
+                       'show_gl' => $this->show_gl_info,
+                       'show_codes' => $this->show_codes,
+                       'date_format' =>$this->date_format,
+                       'date_sep' => $this->date_sep,
+                       'tho_sep' => $this->tho_sep,
+                       'dec_sep' => $this->dec_sep,
+                       'theme' => $this->theme,
+                       'page_size' => $this->pagesize,
+                       'show_hints' => $this->show_hints,
+                       'print_profile' => $this->print_profile,
+                       'rep_popup' => $this->rep_popup,
+                       'query_size' => $this->query_size,
+                       'graphic_links' => $this->graphic_links,
+                       'sticky_doc_date' => $this->sticky_date,
+                       'startup_tab' => $this->startup_tab);
+       }
+       
        function language() 
        {
                return $this->language;