aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-11 17:29:23 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-11 17:29:23 +0000
commit398dfbd30d5b4974ccc8df71ae34795e86ffff38 (patch)
treeceb0134134cfd217d78ef95a26dbe904c036685d /engine
parent4b9104e5ffe1fdcea4cae5831b8cb7a260d69528 (diff)
downloadelgg-398dfbd30d5b4974ccc8df71ae34795e86ffff38.tar.gz
elgg-398dfbd30d5b4974ccc8df71ae34795e86ffff38.tar.bz2
Some more bootstrapping.
git-svn-id: https://code.elgg.org/elgg/trunk@4 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/settings.example.php3
-rw-r--r--engine/start.functions.php15
-rw-r--r--engine/start.php35
3 files changed, 36 insertions, 17 deletions
diff --git a/engine/settings.example.php b/engine/settings.example.php
new file mode 100644
index 000000000..0165eb215
--- /dev/null
+++ b/engine/settings.example.php
@@ -0,0 +1,3 @@
+<?php
+
+?> \ No newline at end of file
diff --git a/engine/start.functions.php b/engine/start.functions.php
deleted file mode 100644
index 193a16013..000000000
--- a/engine/start.functions.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
- /**
- * Elgg engine bootstrapper helper
- * Functions used in start.php
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008
- * @link http://elgg.org/
- */
-
-?> \ No newline at end of file
diff --git a/engine/start.php b/engine/start.php
index afd2dc504..10d835370 100644
--- a/engine/start.php
+++ b/engine/start.php
@@ -13,9 +13,40 @@
*/
/**
- * Load the helper function
+ * Load important prerequisites
*/
- require_once(dirname(__FILE__) . "/start.functions.php");
+ require_once(dirname(__FILE__) . "/settings.php"); // Global settings
+ require_once(dirname(__FILE__) . "/lib/elgglib.php"); // Elgg core functions
+ require_once(dirname(__FILE__) . "/lib/database.php"); // Database connection
+
+ /**
+ * Load the configuration
+ */
+
+ global $CONFIG;
+
+ /**
+ * Load the remaining libraries from /lib/ in alphabetical order,
+ * except for a few exceptions
+ */
+
+ $file_exceptions = array(
+ '.','..',
+ 'settings.php','settings.example.php','elgglib.php','database.php'
+ );
+
+ if ($handle = opendir(dirname(__FILE__) . "/lib/")) {
+ $files = array();
+ while ($file = readdir($handle)) {
+ if (!in_array($file,$file_exceptions)) {
+ if (!is_dir(dirname(__FILE__) . "/lib/" . $file)) {
+ $files[] = dirname(__FILE__) . "/lib/" . $file;
+ } else {
+
+ }
+ }
+ }
+ }
?> \ No newline at end of file