aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/database_update.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-01-10 22:45:26 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2013-02-06 11:35:53 -0600
commit8baceacc36f06c2c14d4a4c08cecb3c80b3c76d3 (patch)
tree8fb25baea843c3a054a18595c222089f39a862b8 /phpBB/install/database_update.php
parent74f4397451dae0ab83d977d97d96ed9549bf3ab9 (diff)
downloadforums-8baceacc36f06c2c14d4a4c08cecb3c80b3c76d3.tar
forums-8baceacc36f06c2c14d4a4c08cecb3c80b3c76d3.tar.gz
forums-8baceacc36f06c2c14d4a4c08cecb3c80b3c76d3.tar.bz2
forums-8baceacc36f06c2c14d4a4c08cecb3c80b3c76d3.tar.xz
forums-8baceacc36f06c2c14d4a4c08cecb3c80b3c76d3.zip
[feature/migrations] Fix migrations installer, schema for schema_data.sql
PHPBB3-11318
Diffstat (limited to 'phpBB/install/database_update.php')
-rw-r--r--phpBB/install/database_update.php94
1 files changed, 47 insertions, 47 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 74aa072d22..f220a1f684 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -21,6 +21,52 @@ 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);
+ }
+ }
+}
+
+function phpbb_end_update($cache)
+{
+ $cache->purge();
+
+?>
+ </p>
+ </div>
+ </div>
+ <span class="corners-bottom"><span></span></span>
+ </div>
+ </div>
+ </div>
+
+ <div id="page-footer">
+ Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group
+ </div>
+ </div>
+</body>
+</html>
+
+<?php
+
+ garbage_collection();
+ exit_handler();
+}
+
phpbb_require_updated('includes/startup.' . $phpEx);
include($phpbb_root_path . 'config.' . $phpEx);
@@ -149,7 +195,7 @@ header('Content-type: text/html; charset=UTF-8');
// Make sure migrations have been installed. If not, install migrations and guess what migrations have been installed
$db_tools = $phpbb_container->get('dbal.tools');
-if (!$db_tools->sql_table_exists(MIGRATIONS_TABLE))
+if (!$db_tools->sql_table_exists($table_prefix . 'migrations'))
{
$migrations_installer = new phpbb_db_migration_install();
$migrations_installer->install($db, $db_tools, $table_prefix, $config['version']);
@@ -196,49 +242,3 @@ if ($orig_version != $config['version'])
echo $lang['DATABASE_UPDATE_COMPLETE'];
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 phpbb_end_update($cache)
-{
- $cache->purge();
-
-?>
- </p>
- </div>
- </div>
- <span class="corners-bottom"><span></span></span>
- </div>
- </div>
- </div>
-
- <div id="page-footer">
- Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group
- </div>
- </div>
-</body>
-</html>
-
-<?php
-
- garbage_collection();
- exit_handler();
-}