aboutsummaryrefslogtreecommitdiff
path: root/engine/start.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-02-09 22:29:17 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-02-09 22:29:17 +0000
commit7126862be4c40dfd24f01a4e68aba5de9b9488fa (patch)
treea73d3f9ec2f62048ec6e0f2b236ff2d2b6ec9d03 /engine/start.php
parentd02164662eda11c0170bc4023fc33d35c6c456f8 (diff)
downloadelgg-7126862be4c40dfd24f01a4e68aba5de9b9488fa.tar.gz
elgg-7126862be4c40dfd24f01a4e68aba5de9b9488fa.tar.bz2
Fixes #1503, fixes #1474: Library files are loaded using a hard-coded list to better deal with removed files. Also, ~4% performance increase per page load on my server!
git-svn-id: http://code.elgg.org/elgg/trunk@3927 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/start.php')
-rw-r--r--engine/start.php35
1 files changed, 18 insertions, 17 deletions
diff --git a/engine/start.php b/engine/start.php
index 8d5d4fac5..ff14b378b 100644
--- a/engine/start.php
+++ b/engine/start.php
@@ -116,31 +116,32 @@ if ($sanitised = sanitised()) {
throw new InstallationException("Elgg could not load the main Elgg database library.");
}
- /**
- * Load the remaining libraries from /lib/ in alphabetical order,
- * except for a few exceptions
- */
if (!include_once(dirname(__FILE__) . "/lib/actions.php")) {
throw new InstallationException("Elgg could not load the Actions library");
}
- // We don't want to load or reload these files
- $file_exceptions = array(
- '.', '..', '.DS_Store', 'Thumbs.db', '.svn',
- 'CVS', 'cvs', 'settings.php', 'settings.example.php',
- 'languages.php', 'exceptions.php', 'elgglib.php', 'access.php',
- 'database.php', 'actions.php', 'sessions.php'
- );
-
- // Get the list of files to include, and alphabetically sort them
- $files = get_library_files(dirname(__FILE__) . "/lib",$file_exceptions);
- asort($files);
-
// Get config
global $CONFIG;
+ // load the rest of the library files from engine/lib/
+ $lib_files = array(
+ 'activity.php', 'admin.php', 'annotations.php', 'api.php',
+ 'cache.php', 'calendar.php', 'configuration.php', 'cron.php',
+ 'entities.php', 'export.php', 'extender.php', 'filestore.php',
+ 'group.php', 'input.php', 'install.php', 'location.php', 'mb_wrapper.php',
+ 'memcache.php', 'metadata.php', 'metastrings.php', 'notification.php',
+ 'objects.php', 'opendd.php', 'pagehandler.php', 'pageowner.php', 'pam.php',
+ 'plugins.php', 'query.php', 'relationships.php', 'river2.php', 'sites.php',
+ 'social.php', 'statistics.php', 'system_log.php', 'tags.php',
+ 'usersettings.php', 'users.php', 'version.php', 'widgets.php', 'xml.php',
+ 'xml-rpc.php'
+ );
+
+ $lib_dir = dirname(__FILE__) . '/lib/';
+
// Include them
- foreach($files as $file) {
+ foreach($lib_files as $file) {
+ $file = $lib_dir . $file;
elgg_log("Loading $file...");
if (!include_once($file)) {
throw new InstallationException("Could not load {$file}");