From 398dfbd30d5b4974ccc8df71ae34795e86ffff38 Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 11 Feb 2008 17:29:23 +0000 Subject: Some more bootstrapping. git-svn-id: https://code.elgg.org/elgg/trunk@4 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/start.php | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'engine/start.php') 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 -- cgit v1.2.3