diff options
-rw-r--r-- | engine/settings.example.php | 3 | ||||
-rw-r--r-- | engine/start.functions.php | 15 | ||||
-rw-r--r-- | engine/start.php | 35 |
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 |