From: Joe Hunt Date: Tue, 25 Aug 2009 09:20:37 +0000 (+0000) Subject: Changed default startup_up app to be in user preferences. Default 'Sales'. X-Git-Tag: v2.4.2~19^2~1294 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=898036f37b83358167b8a391729e5a2711d467f9 Changed default startup_up app to be in user preferences. Default 'Sales'. Moved tab_list_row to ui_lists.inc and changed the global $tabs to be in types.inc --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d21348f3..da74759a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,6 +22,21 @@ $ -> Affected files 25-Aug-2009 Joe Hunt + Added reference number in report List of Journal Entries. $ /reporting/rep702.php +! Changed default startup_up app to be in user preferences. Default 'Sales'. + Moved tab_list_row to ui_lists.inc and changed the global $tabs to be in types.inc +$ config.php + /admin/display_prefs.php + /admin/inst_module.php + /admin/db/users_db.inc + /includes/current_user.inc + /includes/types.inc + /includes/page/header.inc + /includes/prefs/userprefs.inc + /includes/ui/ui_lists.inc + /sql/alter2.2.sql + /sql/en_US-demo.sql + /sql/en_US-new.sql + 24-Aug-2009 Janusz Dobrowolski # Fixed warning displayed before db upgrade. diff --git a/admin/db/users_db.inc b/admin/db/users_db.inc index 527b89ce..ebb9c8f6 100644 --- a/admin/db/users_db.inc +++ b/admin/db/users_db.inc @@ -56,7 +56,7 @@ function update_user($id, $user_id, $real_name, $phone, $email, $full_access, function update_user_display_prefs($id, $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) + $graphic_links, $lang, $stickydate, $startup_tab) { $sql = "UPDATE ".TB_PREF."users SET prices_dec=".db_escape($price_dec).", @@ -77,7 +77,8 @@ function update_user_display_prefs($id, $price_dec, $qty_dec, $exrate_dec, query_size=$query_size, graphic_links=$graphic_links, language=".db_escape($lang).", - sticky_doc_date=".db_escape($stickydate)." + sticky_doc_date=".db_escape($stickydate).", + startup_tab=".db_escape($startup_tab)." WHERE id = ".db_escape($id); db_query($sql, "could not update user display prefs for $id"); diff --git a/admin/display_prefs.php b/admin/display_prefs.php index 6d1bd6c4..1d77d286 100644 --- a/admin/display_prefs.php +++ b/admin/display_prefs.php @@ -42,7 +42,7 @@ if (isset($_POST['setprefs'])) $_POST['theme'], $_POST['page_size'], check_value('show_hints'), $_POST['profile'], check_value('rep_popup'), (int)($_POST['query_size']), check_value('graphic_links'), - $_POST['language'], check_value('sticky_doc_date')); + $_POST['language'], check_value('sticky_doc_date'), $_POST['startup_tab']); if ($chg_lang) language::set_language($_POST['language']); @@ -110,6 +110,8 @@ possible separators can be added by modifying the array definition by editing th pagesizes_list_row(_("Page Size:"), "page_size", user_pagesize()); +tab_list_row(_("Start-up Tab"), 'startup_tab', user_startup_tab()); + /* The array $pagesizes is set up in config.php for modifications possible separators can be added by modifying the array definition by editing that file */ diff --git a/admin/inst_module.php b/admin/inst_module.php index 622f5305..342c3e7f 100644 --- a/admin/inst_module.php +++ b/admin/inst_module.php @@ -21,10 +21,6 @@ include_once($path_to_root . "/admin/db/maintenance_db.inc"); include_once($path_to_root . "/modules/installed_modules.php"); include_once($path_to_root . "/includes/ui.inc"); -$tabs = array('orders', 'AP', 'stock', 'manuf', 'proj', 'GL', 'system'); -$names = array(_("Sales"), _("Purchases"), _("Items and Inventory"), _("Manufacturing"), - _("Dimensions"), _("Banking and General Ledger"), _("Setup")); - //--------------------------------------------------------------------------------------------- if (isset($_GET['selected_id'])) @@ -40,39 +36,6 @@ else //--------------------------------------------------------------------------------------------- -function get_tab_title($tab) -{ - global $tabs, $names; - for ($i = 0; $i < count($tabs); $i++) - { - if ($tabs[$i] == $tab) - return $names[$i]; - } - return ""; -} - -function tab_list_row($label, $name, $selected) -{ - global $tabs, $names; - echo "\n"; - if ($label != null) - echo "$label\n"; - if ($selected == null) - $selected = (!isset($_POST[$name]) ? "orders" : $_POST[$name]); - echo "\n"; - echo "\n"; -} - -//--------------------------------------------------------------------------------------------- - function check_data() { if ($_POST['name'] == "" || $_POST['path'] == "") @@ -263,7 +226,7 @@ function handle_delete() function display_modules() { - global $table_style, $installed_modules; + global $table_style, $installed_modules, $tabs; echo "