aboutsummaryrefslogtreecommitdiff
path: root/engine/start.php
diff options
context:
space:
mode:
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