diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2011-06-19 17:56:30 +0200 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2011-06-19 17:56:30 +0200 |
| commit | c4c22d4421950a12986baeacab8bc150fbae3b9d (patch) | |
| tree | e0f5c2df3ed072576096e5668b1d9ba0a34c2766 /phpBB/install/database_update.php | |
| parent | 882cb084d70cc428dcba9b07c45666a4a6615635 (diff) | |
| parent | d37e8dd6d38bc288ae9179389ac845cab1f61386 (diff) | |
| download | forums-c4c22d4421950a12986baeacab8bc150fbae3b9d.tar forums-c4c22d4421950a12986baeacab8bc150fbae3b9d.tar.gz forums-c4c22d4421950a12986baeacab8bc150fbae3b9d.tar.bz2 forums-c4c22d4421950a12986baeacab8bc150fbae3b9d.tar.xz forums-c4c22d4421950a12986baeacab8bc150fbae3b9d.zip | |
Merge remote-tracking branch 'naderman/ticket/10223' into prep-release-3.0.9
* naderman/ticket/10223:
[ticket/10223] The search fid parameter is an array of forums not just an id
[ticket/10223] Check optional before file_exists and correct require path
[ticket/10223] requiring the new startup.php file conditionally.
Diffstat (limited to 'phpBB/install/database_update.php')
| -rw-r--r-- | phpBB/install/database_update.php | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index e9213cac9d..337f08b626 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -34,7 +34,24 @@ define('IN_INSTALL', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); -require($phpbb_root_path . 'includes/startup.' . $phpEx); +function phpbb_require_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)) + { + require($new_path); + } + else if (!$optional || file_exists($old_path)) + { + require($old_path); + } +} + +phpbb_require_updated('includes/startup.' . $phpEx); $updates_to_version = UPDATES_TO_VERSION; $debug_from_version = DEBUG_FROM_VERSION; @@ -72,10 +89,7 @@ require($phpbb_root_path . 'includes/auth.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); -if (file_exists($phpbb_root_path . 'includes/functions_content.' . $phpEx)) -{ - require($phpbb_root_path . 'includes/functions_content.' . $phpEx); -} +phpbb_require_updated('includes/functions_content.' . $phpEx, true); require($phpbb_root_path . 'includes/functions_admin.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx); |
