aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-01-10 17:25:53 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2013-02-06 11:35:53 -0600
commitbabdb92aa998728b58eec1e3f2c036b5f2342492 (patch)
treeefb00da8b4cc674533d00a515004ceba217f45e5 /phpBB/install
parentca55f6c4817d85b94562597cba79037ae440d973 (diff)
downloadforums-babdb92aa998728b58eec1e3f2c036b5f2342492.tar
forums-babdb92aa998728b58eec1e3f2c036b5f2342492.tar.gz
forums-babdb92aa998728b58eec1e3f2c036b5f2342492.tar.bz2
forums-babdb92aa998728b58eec1e3f2c036b5f2342492.tar.xz
forums-babdb92aa998728b58eec1e3f2c036b5f2342492.zip
[feature/migrations] Remove hardcoded language, use lang instead.
PHPBB3-9737
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/database_update.php54
1 files changed, 27 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('&', '&amp;', 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();