aboutsummaryrefslogtreecommitdiff
path: root/engine/start.php
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-03 12:24:00 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-03 12:24:00 +0000
commitc8b3dad148e1a68788e99572ed63551ea050f50b (patch)
tree29ddb840344c317bf515a2be0359804390f823da /engine/start.php
parent82abe9787b0397400a7eb606fc6bf19ab07b5a91 (diff)
downloadelgg-c8b3dad148e1a68788e99572ed63551ea050f50b.tar.gz
elgg-c8b3dad148e1a68788e99572ed63551ea050f50b.tar.bz2
ticket #728 dealt with
git-svn-id: https://code.elgg.org/elgg/trunk@2633 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/start.php')
-rw-r--r--engine/start.php117
1 files changed, 57 insertions, 60 deletions
diff --git a/engine/start.php b/engine/start.php
index 18daf2959..819c95ace 100644
--- a/engine/start.php
+++ b/engine/start.php
@@ -11,8 +11,8 @@
* @copyright Curverider Ltd 2008-2009
* @link http://elgg.org/
*/
-
-
+
+
/**
* Load important prerequisites
@@ -21,50 +21,50 @@
if (!@include_once(dirname(__FILE__) . "/lib/exceptions.php")) { // Exceptions
echo "Error in installation: could not load the Exceptions library.";
exit;
- }
+ }
if (!@include_once(dirname(__FILE__) . "/lib/elgglib.php")) { // Main Elgg library
- echo "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
+ echo "Error in installation: could not load the System Log library.";
exit;
- }
-
- if (!@include_once(dirname(__FILE__) . "/lib/system_log.php")) { // Logging library
- echo "Error in installation: could not load the System Log library.";
- exit;
- }
+ }
if (!@include_once(dirname(__FILE__) . "/lib/export.php")) { // Export library
- echo "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")) { // Languages library
- echo "Error in installation: could not load the 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;
- }
-
- 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;
}
if (!@include_once(dirname(__FILE__) . "/lib/cache.php")) { // Installation library
echo "Error in installation: could not load the cache library.";
exit;
- }
-
- if (!@include_once(dirname(__FILE__) . "/lib/sessions.php")) {
- echo ("Error in installation: Elgg could not load the Sessions library");
- exit;
- }
-
- // Use fallback view until sanitised
- $oldview = get_input('view');
+ }
+
+ if (!@include_once(dirname(__FILE__) . "/lib/sessions.php")) {
+ echo ("Error in installation: Elgg could not load the Sessions library");
+ exit;
+ }
+
+ // Use fallback view until sanitised
+ $oldview = get_input('view');
set_input('view', 'failsafe');
/**
@@ -115,8 +115,8 @@
// We don't want to load or reload these files
$file_exceptions = array(
- '.','..',
- '.DS_Store',
+ '.','..',
+ '.DS_Store',
'Thumbs.db',
'.svn',
'CVS','cvs',
@@ -129,48 +129,45 @@
asort($files);
// Include them
- foreach($files as $file) {
+ foreach($files as $file) {
if (isset($CONFIG->debug) && $CONFIG->debug) error_log("Loading $file...");
if (!@include_once($file))
throw new InstallationException("Could not load {$file}");
}
-
- // Set default config
- set_default_config();
} else { // End portion for sanitised installs only
-
+
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');
-
- // Load plugins
-
- $installed = is_installed();
- $db_installed = is_db_installed();
-
- // Determine light mode
- $lm = strtolower(get_input('lightmode'));
- if ($lm == 'true') $lightmode = true;
-
- // Load plugins, if we're not in light mode
- if (($installed) && ($db_installed) && ($sanitised) && (!$lightmode)) {
- load_plugins();
-
- trigger_elgg_event('plugins_boot', 'system');
- }
+ trigger_elgg_event('boot', 'system');
+
+ // Load plugins
+
+ $installed = is_installed();
+ $db_installed = is_db_installed();
+
+ // Determine light mode
+ $lm = strtolower(get_input('lightmode'));
+ if ($lm == 'true') $lightmode = true;
+
+ // Load plugins, if we're not in light mode
+ if (($installed) && ($db_installed) && ($sanitised) && (!$lightmode)) {
+ load_plugins();
+
+ trigger_elgg_event('plugins_boot', 'system');
+ }
// Forward if we haven't been installed
if ((!$installed || !$db_installed) && !substr_count($_SERVER["PHP_SELF"],"install.php") && !substr_count($_SERVER["PHP_SELF"],"css.php") && !substr_count($_SERVER["PHP_SELF"],"action_handler.php")) {
header("Location: install.php");
exit;
- }
+ }
// Trigger events
if (!substr_count($_SERVER["PHP_SELF"],"install.php") &&
@@ -183,8 +180,8 @@
//forward("setup.php");
//}
}
-
-
- // System booted, return to normal view
+
+
+ // System booted, return to normal view
set_input('view', $oldview);
?> \ No newline at end of file