aboutsummaryrefslogtreecommitdiff
path: root/engine/start.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-12 12:46:30 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-12 12:46:30 +0000
commiteba31495c573836877c20fffdd833352738067ec (patch)
treeda5d9056048787c96a73394308145cfe22dceee6 /engine/start.php
parent4be0a2ac1c8e959945cfaffed4e1ad59bfdad5ec (diff)
downloadelgg-eba31495c573836877c20fffdd833352738067ec.tar.gz
elgg-eba31495c573836877c20fffdd833352738067ec.tar.bz2
Introducing views and some sanitisation
git-svn-id: https://code.elgg.org/elgg/trunk@6 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/start.php')
-rw-r--r--engine/start.php29
1 files changed, 25 insertions, 4 deletions
diff --git a/engine/start.php b/engine/start.php
index 5e82ceae9..864b2b112 100644
--- a/engine/start.php
+++ b/engine/start.php
@@ -16,9 +16,25 @@
* Load important prerequisites
*/
- require_once(dirname(__FILE__) . "/lib/elgglib.php"); // Elgg core functions
- require_once(dirname(__FILE__) . "/lib/database.php"); // Database connection
- include(dirname(__FILE__) . "/settings.php"); // Global settings
+ if (!@include(dirname(__FILE__) . "/lib/elgglib.php")) { // Main Elgg library
+ 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,
@@ -41,7 +57,12 @@
// Include them
foreach($files as $file) {
- include($file);
+ if (!@include_once($file))
+ register_error("Could not load {$file}");
+ }
+
+ if ($errors = system_messages(null, "errors")) {
+ // Do something!
}
?> \ No newline at end of file