From 520204dd7de32f96281a0f4c48eb0d822c73e807 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 2 Apr 2007 19:06:29 +0000 Subject: [PATCH] r1528: In install/installer.php: - Move the data caching system up to be right after we load settings and default data - Call build_usergroups() right before we insert the new admin user, removing the problem of the usergroup datastore not being built for build_assingedto() --- docs/changes.txt | 1 + install/install.php | 105 +++++++++++++++++++++++--------------------- 2 files changed, 56 insertions(+), 50 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 42cd3c0..431e0a7 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -6,6 +6,7 @@ - Fixed: On PHP4 systems, a bug in the BugAPI would prevent any data from being saved because PHP4 doesn't support call_user_func() of parent:: selectors - Change: When clicking the "[Run Search]" link in the "Saved Searches" section of the "Options" tab, force the search to rerun - Fixed: Some email roles would not get notified under certain circumstances because the list of users to notify was reset +- Fixed: Errors would occurr on installation due to a problem with not loading all the data at the right time 1.2.0 Beta 2 =============================== diff --git a/install/install.php b/install/install.php index 91f2196..18cc8d3 100644 --- a/install/install.php +++ b/install/install.php @@ -116,9 +116,56 @@ if ($bugsys->in['mark'] == 3) echo 'Settings loaded...'; } + // ################################################################### if ($bugsys->in['mark'] == 4) +{ +?> +

Cache Data

+ +

In order to make Bugdar as efficient as possible, the system caches the portions of data it can. This reduces the load of your server without compromising usability. Currently the caches are being built.

+\n"; + + build_usergroups(); + echo "Cached usergroups
\n"; + + build_statuses(); + echo "Cached statuses
\n"; + + build_priorities(); + echo "Cached priorities
\n"; + + build_severities(); + echo "Cached severities
\n"; + + build_assignedto(); + echo "Cached assignable users/developers
\n"; + + build_resolutions(); + echo "Cached resolutions
\n"; + + build_products(); + echo "Cached products
\n"; + + build_versions(); + echo "Cached versions
\n"; + + build_languages(); + echo "Cached languages
\n"; + + build_user_help(); + echo "Cached user help documentation
\n"; +} + +// ################################################################### + +if ($bugsys->in['mark'] == 5) { $value = 'http' . ($_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != '80' ? ':' . $_SERVER['SERVER_PORT'] : '') . str_replace('/install/install.php', '', $_SERVER['SCRIPT_NAME']); ?> @@ -127,7 +174,7 @@ if ($bugsys->in['mark'] == 4)

These three settings are fundamental in setting up your bug tracking system. Please fill them in to proceed with the installation.

- +
Tracker Name (the name of the entire tracking system, for instance "Acme Inc. Bug Tracker"):
Tracker URL (the root URL of your tracker, we have tried to guess this for you; it does not end with a trailing slash!):
@@ -144,7 +191,7 @@ if ($bugsys->in['mark'] == 4) // ################################################################### -if ($bugsys->in['mark'] == 5) +if ($bugsys->in['mark'] == 6) { ?>

New Administrator

@@ -152,7 +199,7 @@ if ($bugsys->in['mark'] == 5)

Your settings have been saved. Now you must create a new administrative account for yourself. This account will have complete control over the system.

- +
Display Name:
Email Address:
@@ -172,7 +219,7 @@ if ($bugsys->in['mark'] == 5) // ################################################################### -if ($bugsys->in['mark'] == 6) +if ($bugsys->in['mark'] == 7) { ?>

User Added

@@ -182,6 +229,10 @@ if ($bugsys->in['mark'] == 6) require_once('./includes/api_user.php'); + // we need to do this here because build_assignedto() uses this data and we don't have it loaded in + // the installer, so we need to do it manually + build_usergroups(); + $user = new UserAPI($bugsys); $user->set('email', $bugsys->in['email']); $user->set('displayname', $bugsys->in['displayname']); @@ -193,52 +244,6 @@ if ($bugsys->in['mark'] == 6) // ################################################################### -if ($bugsys->in['mark'] == 7) -{ -?> -

Cache Data

- -

In order to make Bugdar as efficient as possible, the system caches the portions of data it can. This reduces the load of your server without compromising usability. Currently the caches are being built.

-\n"; - - build_usergroups(); - echo "Cached usergroups
\n"; - - build_statuses(); - echo "Cached statuses
\n"; - - build_priorities(); - echo "Cached priorities
\n"; - - build_severities(); - echo "Cached severities
\n"; - - build_assignedto(); - echo "Cached assignable users/developers
\n"; - - build_resolutions(); - echo "Cached resolutions
\n"; - - build_products(); - echo "Cached products
\n"; - - build_versions(); - echo "Cached versions
\n"; - - build_languages(); - echo "Cached languages
\n"; - - build_user_help(); - echo "Cached user help documentation
\n"; -} - -// ################################################################### - page_end(); /*=====================================================================*\ -- 2.43.5