aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/index.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-06-10 13:54:48 +0200
committerJoas Schilling <nickvergessen@gmx.de>2013-07-13 09:57:56 +0200
commitf11993c0382d6942a14b37686d2c00dac97a6748 (patch)
treef0edd355387b043a786edfee37df7e4fdf517a01 /phpBB/install/index.php
parente12fd2fdda76f629060c517aab9812b8565cc696 (diff)
downloadforums-f11993c0382d6942a14b37686d2c00dac97a6748.tar
forums-f11993c0382d6942a14b37686d2c00dac97a6748.tar.gz
forums-f11993c0382d6942a14b37686d2c00dac97a6748.tar.bz2
forums-f11993c0382d6942a14b37686d2c00dac97a6748.tar.xz
forums-f11993c0382d6942a14b37686d2c00dac97a6748.zip
[ticket/11574] Require new files in install/index.php and add a class loader
PHPBB3-11574
Diffstat (limited to 'phpBB/install/index.php')
-rw-r--r--phpBB/install/index.php31
1 files changed, 25 insertions, 6 deletions
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index f745f51974..90cd71d7f3 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -43,6 +43,23 @@ function phpbb_require_updated($path, $optional = false)
}
}
+function phpbb_include_updated($path, $optional = false)
+{
+ global $phpbb_root_path;
+
+ $new_path = $phpbb_root_path . 'install/update/new/' . $path;
+ $old_path = $phpbb_root_path . $path;
+
+ if (file_exists($new_path))
+ {
+ include($new_path);
+ }
+ else if (!$optional || file_exists($old_path))
+ {
+ include($old_path);
+ }
+}
+
phpbb_require_updated('includes/startup.' . $phpEx);
// Try to override some limits - maybe it helps some...
@@ -78,18 +95,20 @@ $phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relati
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path;
// Include essential scripts
-require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
+phpbb_require_updated('includes/class_loader.' . $phpEx);
-require($phpbb_root_path . 'includes/functions.' . $phpEx);
-require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
+phpbb_require_updated('includes/functions.' . $phpEx);
+phpbb_require_updated('includes/functions_container.' . $phpEx);
phpbb_require_updated('includes/functions_content.' . $phpEx, true);
-include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
-include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
-require($phpbb_root_path . 'includes/functions_install.' . $phpEx);
+phpbb_include_updated('includes/functions_admin.' . $phpEx);
+phpbb_include_updated('includes/utf/utf_tools.' . $phpEx);
+phpbb_require_updated('includes/functions_install.' . $phpEx);
// Setup class loader first
+$phpbb_class_loader_new = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}install/update/new/includes/", $phpEx);
+$phpbb_class_loader_new->register();
$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}includes/", $phpEx);
$phpbb_class_loader->register();
$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_path}ext/", $phpEx);