aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-13 11:06:28 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-13 11:06:28 +0000
commitd8373e8e48ab49cda7a616116d7795eb139a7142 (patch)
tree1c497000dafa6c7bde361af4372fa62816d53240 /engine
parent478086b662e23267137f12bf57f6a7ad56025d98 (diff)
downloadelgg-d8373e8e48ab49cda7a616116d7795eb139a7142.tar.gz
elgg-d8373e8e48ab49cda7a616116d7795eb139a7142.tar.bz2
Some error reporting and initial (very, very basic) templating
git-svn-id: https://code.elgg.org/elgg/trunk@11 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/start.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/engine/start.php b/engine/start.php
index ca1875bbc..3aef3c803 100644
--- a/engine/start.php
+++ b/engine/start.php
@@ -16,7 +16,7 @@
* Load important prerequisites
*/
- if (!@include(dirname(__FILE__) . "/lib/elgglib.php")) { // Main Elgg library
+ if (!@include_once(dirname(__FILE__) . "/lib/elgglib.php")) { // Main Elgg library
echo "Error in installation: could not load the main Elgg library.";
exit;
}
@@ -25,8 +25,7 @@
* Load the system settings
*/
- if (!@include_once(dirname(__FILE__) . "/settings.php")) // Global settings
- register_error("Could not load the settings file.");
+ @include_once(dirname(__FILE__) . "/settings.php"); // Global settings
/**
* If there are basic issues with the way the installation is formed, don't bother trying
@@ -68,13 +67,20 @@
register_error("Could not load {$file}");
}
- } // End portion for sanitised installs only
-
+ } else { // End portion for sanitised installs only
+ register_error("Elgg is not ready to run.");
+ }
+
// Trigger events
trigger_event('init', 'system');
- if ($count = count_messages("errors")) {
-
- }
+ // If we have load errors, display them
+ if ($count = count_messages("errors")) {
+ echo elgg_view('pageshell', array(
+ 'title' => "Error",
+ 'body' => elgg_view('messages/errors/list',array('object' => system_messages(null, "errors")))
+ ));
+ exit;
+ }
?> \ No newline at end of file