diff options
| -rw-r--r-- | phpBB/install/database_update.php | 54 | ||||
| -rw-r--r-- | phpBB/language/en/install.php | 3 |
2 files changed, 30 insertions, 27 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 7431c96231..cd43f6065b 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -21,26 +21,6 @@ define('IN_INSTALL', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); -if (!function_exists('phpbb_require_updated')) -{ - 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); include($phpbb_root_path . 'config.' . $phpEx); @@ -200,7 +180,7 @@ while (!$migrator->finished()) { echo $e; - end_update($cache); + phpbb_end_update($cache); } echo $migrator->last_run_migration['name'] . '<br />'; @@ -209,10 +189,10 @@ while (!$migrator->finished()) if ((time() - $update_start_time) >= $safe_time_limit) { //echo '<meta http-equiv="refresh" content="0;url=' . str_replace('&', '&', append_sid($phpbb_root_path . 'test.' . $phpEx)) . '" />'; - echo 'Update not yet completed.<br />'; - echo '<a href="' . append_sid($phpbb_root_path . 'test.' . $phpEx) . '">Continue</a>'; + echo $lang['DATABASE_UPDATE_NOT_COMPLETED'] . '<br />'; + echo '<a href="' . append_sid($phpbb_root_path . 'test.' . $phpEx) . '">' . $lang['DATABASE_UPDATE_CONTINUE'] . '</a>'; - end_update($cache); + phpbb_end_update($cache); } } @@ -221,11 +201,31 @@ if ($orig_version != $config['version']) add_log('admin', 'LOG_UPDATE_DATABASE', $orig_version, $config['version']); } -echo 'Finished'; +echo $lang['DATABASE_UPDATE_COMPLETE']; -end_update($cache); +phpbb_end_update($cache); + +if (!function_exists('phpbb_require_updated')) +{ + 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); + } + } +} -function end_update($cache) +function phpbb_end_update($cache) { $cache->purge(); diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index f7820714e1..7607512eab 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -397,7 +397,10 @@ $lang = array_merge($lang, array( 'CURRENT_VERSION' => 'Current version', 'DATABASE_TYPE' => 'Database type', + 'DATABASE_UPDATE_COMPLETE' => 'Database updater has completed!', + 'DATABASE_UPDATE_CONTINUE' => 'Continue database update.', 'DATABASE_UPDATE_INFO_OLD' => 'The database update file within the install directory is outdated. Please make sure you uploaded the correct version of the file.', + 'DATABASE_UPDATE_NOT_COMPLETED' => 'The database update has not yet completed.', 'DELETE_USER_REMOVE' => 'Delete user and remove posts', 'DELETE_USER_RETAIN' => 'Delete user but keep posts', 'DESTINATION' => 'Destination file', |
