X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fdisplay_prefs.php;h=6d7e06bf236d12b139d8b8eb8dbdeb82fd77743a;hb=df660a601cabb0afe7f3246884f16207b9a0c314;hp=9b60dc55949b2fd56575bc12e42655058c8e006d;hpb=2948486e17c38fa2d9d857ed573a85c2e44aeee9;p=fa-stable.git diff --git a/admin/display_prefs.php b/admin/display_prefs.php index 9b60dc55..6d7e06bf 100644 --- a/admin/display_prefs.php +++ b/admin/display_prefs.php @@ -40,10 +40,12 @@ if (isset($_POST['setprefs'])) array('prices_dec', 'qty_dec', 'rates_dec', 'percent_dec', 'date_format', 'date_sep', 'tho_sep', 'dec_sep', 'print_profile', 'theme', 'page_size', 'language', 'startup_tab', - 'show_gl' => 0, 'show_codes'=> 0, 'show_hints' => 0, - 'rep_popup' => 0, 'graphic_links' => 0, 'sticky_doc_date' => 0, - 'query_size' => 10.0, 'transaction_days' => 30, 'save_report_selections' => 0, - 'use_date_picker' => 0, 'def_print_destination' => 0, 'def_print_orientation' => 0))); + 'query_size' => 10, 'transaction_days' => 30, 'save_report_selections' => 0, + 'def_print_destination' => 0, 'def_print_orientation' => 0))); + + set_user_prefs(check_value( + array( 'show_gl', 'show_codes', 'show_hints', 'rep_popup', + 'graphic_links', 'sticky_doc_date', 'use_date_picker'))); if ($chg_lang) $_SESSION['language']->set_language($_POST['language']); @@ -51,13 +53,13 @@ if (isset($_POST['setprefs'])) flush_dir(company_path().'/js_cache'); - if ($chg_theme && $allow_demo_mode) + if ($chg_theme && $SysPrefs->allow_demo_mode) $_SESSION["wa_current_user"]->prefs->theme = $_POST['theme']; if ($chg_theme || $chg_lang || $chg_date_format || $chg_date_sep) meta_forward($_SERVER['PHP_SELF']); - if ($allow_demo_mode) + if ($SysPrefs->allow_demo_mode) display_warning(_("Display settings have been updated. Keep in mind that changed settings are restored on every login in demo mode.")); else display_notification_centered(_("Display settings have been updated.")); @@ -165,4 +167,3 @@ end_form(2); end_page(); -?> \ No newline at end of file