diff options
author | Nils Adermann <naderman@naderman.de> | 2011-06-20 00:00:30 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2011-06-20 00:00:30 +0200 |
commit | ad5ed9d0ee987da29a6d49c42cc3118d4868e539 (patch) | |
tree | 6b53994e06ef9f20f8770198607d555a272b8107 /phpBB | |
parent | 67fde80fbbfc219352ad19124446bb63451306eb (diff) | |
download | forums-ad5ed9d0ee987da29a6d49c42cc3118d4868e539.tar forums-ad5ed9d0ee987da29a6d49c42cc3118d4868e539.tar.gz forums-ad5ed9d0ee987da29a6d49c42cc3118d4868e539.tar.bz2 forums-ad5ed9d0ee987da29a6d49c42cc3118d4868e539.tar.xz forums-ad5ed9d0ee987da29a6d49c42cc3118d4868e539.zip |
[ticket/10223] Make definition of phpbb_require_updated conditional
The automatic updater defines it too and includes database_update.php
for updating which causes an error otherwise.
PHPBB3-10223
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/install/database_update.php | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index e0901eedb1..edfc3b1027 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -34,20 +34,23 @@ define('IN_INSTALL', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../'; $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) + { + global $phpbb_root_path; - $new_path = $phpbb_root_path . 'install/update/new/' . $path; - $old_path = $phpbb_root_path . $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); + if (file_exists($new_path)) + { + require($new_path); + } + else if (!$optional || file_exists($old_path)) + { + require($old_path); + } } } |