aboutsummaryrefslogtreecommitdiff
path: root/engine/start.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-12 10:49:45 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-12 10:49:45 +0000
commit4be0a2ac1c8e959945cfaffed4e1ad59bfdad5ec (patch)
tree0f8da40c70d7518e91f639ad6622376a08a85311 /engine/start.php
parent398dfbd30d5b4974ccc8df71ae34795e86ffff38 (diff)
downloadelgg-4be0a2ac1c8e959945cfaffed4e1ad59bfdad5ec.tar.gz
elgg-4be0a2ac1c8e959945cfaffed4e1ad59bfdad5ec.tar.bz2
The engine starter now functions appropriately
git-svn-id: https://code.elgg.org/elgg/trunk@5 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/start.php')
-rw-r--r--engine/start.php35
1 files changed, 15 insertions, 20 deletions
diff --git a/engine/start.php b/engine/start.php
index 10d835370..5e82ceae9 100644
--- a/engine/start.php
+++ b/engine/start.php
@@ -16,37 +16,32 @@
* Load important prerequisites
*/
- 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;
+ include(dirname(__FILE__) . "/settings.php"); // Global settings
/**
* 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'
);
-
- 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 {
-
- }
- }
- }
- }
+ // 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) {
+ include($file);
+ }
+
?> \ No newline at end of file