aboutsummaryrefslogtreecommitdiff
path: root/engine/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/start.php')
-rw-r--r--engine/start.php73
1 files changed, 41 insertions, 32 deletions
diff --git a/engine/start.php b/engine/start.php
index 864b2b112..7a38f7155 100644
--- a/engine/start.php
+++ b/engine/start.php
@@ -20,49 +20,58 @@
echo "Error in installation: could not load the main Elgg library.";
exit;
}
- if (!@include_once(dirname(__FILE__) . "/lib/database.php")) // Database connection
- register_error("Could not load the main Elgg database library.");
-
- /**
- * Ensure the installation is correctly formed
- */
-
- sanitise();
-
+
/**
* Load the system settings
*/
if (!@include_once(dirname(__FILE__) . "/settings.php")) // Global settings
register_error("Could not load the settings file.");
-
+
/**
- * Load the remaining libraries from /lib/ in alphabetical order,
- * except for a few exceptions
+ * If there are basic issues with the way the installation is formed, don't bother trying
+ * to load any more files
*/
- // We don't want to load or reload these files
-
- $file_exceptions = array(
- '.','..',
- '.svn',
- 'settings.php','settings.example.php','elgglib.php','database.php'
- );
-
- // Get the list of files to include, and alphabetically sort them
-
- $files = get_library_files(dirname(__FILE__) . "/lib",$file_exceptions);
- asort($files);
-
- // Include them
+ if (sanitised()) { // Begin portion for sanitised installs only
- foreach($files as $file) {
- if (!@include_once($file))
- register_error("Could not load {$file}");
- }
+ /**
+ * Load and initialise the database
+ */
+
+ if (!@include_once(dirname(__FILE__) . "/lib/database.php")) // Database connection
+ register_error("Could not load the main Elgg database library.");
+
+
+ /**
+ * Load the remaining libraries from /lib/ in alphabetical order,
+ * except for a few exceptions
+ */
+
+ // We don't want to load or reload these files
+
+ $file_exceptions = array(
+ '.','..',
+ '.svn',
+ 'settings.php','settings.example.php','elgglib.php','database.php'
+ );
+
+ // Get the list of files to include, and alphabetically sort them
+
+ $files = get_library_files(dirname(__FILE__) . "/lib",$file_exceptions);
+ asort($files);
+
+ // Include them
+
+ foreach($files as $file) {
+ if (!@include_once($file))
+ register_error("Could not load {$file}");
+ }
- if ($errors = system_messages(null, "errors")) {
- // Do something!
+ } // End portion for sanitised installs only
+
+ if ($count = count_messages("errors")) {
+
}
?> \ No newline at end of file