- function update_prefs($price_dec, $qty_dec, $exrate_dec, $percent_dec,
- $showgl, $showcodes, $date_format, $date_sep, $tho_sep, $dec_sep,
- $theme, $pagesize, $show_hints, $profile, $rep_popup, $query_size,
- $graphic_links, $lang, $stickydate, $startup_tab) {
- update_user_display_prefs($this->user, $price_dec,
- $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes,
- $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize,
- $show_hints, $profile, $rep_popup, $query_size, $graphic_links, $lang, $stickydate, $startup_tab);
-
- // re-read the prefs
- $user = get_user($this->user);
- $this->prefs = new user_prefs($user);
+ function hide_inaccessible_menu_items()
+ {
+ global $SysPrefs;
+
+ if (!isset($SysPrefs->hide_inaccessible_menu_items) || $SysPrefs->hide_inaccessible_menu_items == 0)
+ {
+ return false;
+ }
+
+ else
+ {
+ return true;
+ }
+ }
+
+ function set_db_connection($id = -1)
+ {
+ return set_global_connection($id);
+ }
+
+ function update_prefs($prefs)
+ {
+ global $SysPrefs;
+
+ if (!$SysPrefs->allow_demo_mode) {
+ update_user_prefs($this->user, $prefs);
+ }
+
+ $this->prefs = new user_prefs(get_user($this->user));