mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10223] Make definition of phpbb_require_updated conditional
This commit is contained in:
commit
cc7c5d54ad
1 changed files with 15 additions and 12 deletions
|
@ -33,20 +33,23 @@ define('IN_INSTALL', true);
|
||||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
|
|
||||||
function phpbb_require_updated($path, $optional = false)
|
if (!function_exists('phpbb_require_updated'))
|
||||||
{
|
{
|
||||||
global $phpbb_root_path;
|
function phpbb_require_updated($path, $optional = false)
|
||||||
|
|
||||||
$new_path = $phpbb_root_path . 'install/update/new/' . $path;
|
|
||||||
$old_path = $phpbb_root_path . $path;
|
|
||||||
|
|
||||||
if (file_exists($new_path))
|
|
||||||
{
|
{
|
||||||
require($new_path);
|
global $phpbb_root_path;
|
||||||
}
|
|
||||||
else if (!$optional || file_exists($old_path))
|
$new_path = $phpbb_root_path . 'install/update/new/' . $path;
|
||||||
{
|
$old_path = $phpbb_root_path . $path;
|
||||||
require($old_path);
|
|
||||||
|
if (file_exists($new_path))
|
||||||
|
{
|
||||||
|
require($new_path);
|
||||||
|
}
|
||||||
|
else if (!$optional || file_exists($old_path))
|
||||||
|
{
|
||||||
|
require($old_path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue