aboutsummaryrefslogtreecommitdiff
path: root/engine/start.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-12 16:12:50 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-12 16:12:50 +0000
commite5edab721ea12ba5ac937a5adeda53f5e3393611 (patch)
tree719ec8c5ac9b91ae0e536e8d0e375db372a456d1 /engine/start.php
parenteba31495c573836877c20fffdd833352738067ec (diff)
downloadelgg-e5edab721ea12ba5ac937a5adeda53f5e3393611.tar.gz
elgg-e5edab721ea12ba5ac937a5adeda53f5e3393611.tar.bz2
Sanitisation
git-svn-id: https://code.elgg.org/elgg/trunk@7 36083f99-b078-4883-b0ff-0f9b5a30f544
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