From 0f2e67985d80ad91cd000e33d6e8a7751121d370 Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 17 Jun 2008 16:49:21 +0000 Subject: CLOSED - #34: Install process must be completely graphical http://trac.elgg.org/elgg/ticket/34 git-svn-id: https://code.elgg.org/elgg/trunk@951 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/start.php | 51 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 13 deletions(-) (limited to 'engine/start.php') diff --git a/engine/start.php b/engine/start.php index 4682e35b2..ac8d186de 100644 --- a/engine/start.php +++ b/engine/start.php @@ -11,6 +11,8 @@ * @copyright Curverider Ltd 2008 * @link http://elgg.org/ */ + + /** * Load important prerequisites @@ -22,20 +24,38 @@ } if (!@include_once(dirname(__FILE__) . "/lib/elgglib.php")) { // Main Elgg library - throw new InstallationException("Elgg could not load its main library."); + echo "Elgg could not load its main library."; + exit; } if (!@include_once(dirname(__FILE__) . "/lib/system_log.php")) { // Logging library - throw new InstallationException("Error in installation: could not load the System Log library."); + echo "Error in installation: could not load the System Log library."; + exit; } if (!@include_once(dirname(__FILE__) . "/lib/export.php")) { // Export library - throw new InstallationException("Error in installation: could not load the Export library."); + echo "Error in installation: could not load the Export library."; + exit; } - if (!@include_once(dirname(__FILE__) . "/lib/languages.php")) { // Main Elgg library - throw new InstallationException("Error in installation: could not load the languages library."); - } + if (!@include_once(dirname(__FILE__) . "/lib/languages.php")) { // Languages library + echo "Error in installation: could not load the languages library."; + exit; + } + + if (!@include_once(dirname(__FILE__) . "/lib/input.php")) { // Input library + echo "Error in installation: could not load the input library."; + exit; + } + + if (!@include_once(dirname(__FILE__) . "/lib/install.php")) { // Installation library + echo "Error in installation: could not load the installation library."; + exit; + } + + // Use fallback view until sanitised + $oldview = get_input('view'); + set_input('view', 'failsafe'); /** * Set light mode default @@ -118,21 +138,23 @@ load_plugins(); } else { // End portion for sanitised installs only - - throw new InstallationException("Once you've corrected any configuration issues, press reload to try again."); + + throw new InstallationException(elgg_echo('installation:error:configuration')); } // Autodetect some default configuration settings - set_default_config(); + set_default_config(); + // Trigger events - trigger_elgg_event('boot', 'system'); + trigger_elgg_event('boot', 'system'); + // Forward if we haven't been installed if ((!is_installed() || !is_db_installed()) && !substr_count($_SERVER["PHP_SELF"],"install.php") && !substr_count($_SERVER["PHP_SELF"],"action_handler.php")) { header("Location: install.php"); exit; - } - + } + // Trigger events if (!substr_count($_SERVER["PHP_SELF"],"install.php") && !substr_count($_SERVER["PHP_SELF"],"setup.php") && @@ -143,5 +165,8 @@ //forward("setup.php"); } } - + + + // System booted, return to normal view + set_input('view', $oldview); ?> \ No newline at end of file -- cgit v1.2.3