aboutsummaryrefslogtreecommitdiff
path: root/engine/start.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-17 16:49:21 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-17 16:49:21 +0000
commit0f2e67985d80ad91cd000e33d6e8a7751121d370 (patch)
tree8833d61e09436b2d409f5238a8e65741dd720636 /engine/start.php
parentd203a2e6f4bb69b9b33e157c130eab6408ebce89 (diff)
downloadelgg-0f2e67985d80ad91cd000e33d6e8a7751121d370.tar.gz
elgg-0f2e67985d80ad91cd000e33d6e8a7751121d370.tar.bz2
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
Diffstat (limited to 'engine/start.php')
-rw-r--r--engine/start.php51
1 files changed, 38 insertions, 13 deletions
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