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(); // 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'); } // 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") && !substr_count($_SERVER["PHP_SELF"],"setup.php") && !$lightmode) { // If default settings haven't been installed, forward to the default settings page trigger_elgg_event('init', 'system'); if (!datalist_get('default_settings')) { //forward("setup.php"); } } // System booted, return to normal view set_input('view', $oldview); ?>