aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2013-03-03 20:18:05 -0600
committerNathaniel Guse <nathaniel.guse@gmail.com>2013-03-03 20:18:05 -0600
commit6cad032fbb2ceba892c861f8a2abab82574b12ae (patch)
treefe6f03fc47240cf27a0b70a5969acdfd488e8144 /phpBB
parentbee4f8d8185d4ff5278be758db4ea4a814f09b4f (diff)
downloadforums-6cad032fbb2ceba892c861f8a2abab82574b12ae.tar
forums-6cad032fbb2ceba892c861f8a2abab82574b12ae.tar.gz
forums-6cad032fbb2ceba892c861f8a2abab82574b12ae.tar.bz2
forums-6cad032fbb2ceba892c861f8a2abab82574b12ae.tar.xz
forums-6cad032fbb2ceba892c861f8a2abab82574b12ae.zip
[ticket/11393] Give more information on database updater
PHPBB3-11393
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/db/migrator.php9
-rw-r--r--phpBB/install/database_update.php23
-rw-r--r--phpBB/language/en/migrator.php3
3 files changed, 33 insertions, 2 deletions
diff --git a/phpBB/includes/db/migrator.php b/phpBB/includes/db/migrator.php
index de9c06948c..81beb14b76 100644
--- a/phpBB/includes/db/migrator.php
+++ b/phpBB/includes/db/migrator.php
@@ -63,7 +63,9 @@ class phpbb_db_migrator
protected $migrations = array();
/**
- * 'name' and 'class' of the last migration run
+ * 'name,' 'class,' and 'state' of the last migration run
+ *
+ * 'effectively_installed' set and set to true if the migration was effectively_installed
*
* @var array
*/
@@ -304,6 +306,7 @@ class phpbb_db_migrator
$this->last_run_migration = array(
'name' => $name,
'class' => $migration,
+ 'state' => $state,
);
if (!isset($this->migration_state[$name]))
@@ -318,6 +321,8 @@ class phpbb_db_migrator
'migration_start_time' => 0,
'migration_end_time' => 0,
);
+
+ $this->last_run_migration['effectively_installed'] = true;
}
else
{
@@ -662,6 +667,8 @@ class phpbb_db_migrator
}
$this->migration_state[$name] = $state;
+
+ $this->last_run_migration['state'] = $state;
}
/**
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 4938ef0f87..6c8a95a413 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -228,7 +228,28 @@ while (!$migrator->finished())
phpbb_end_update($cache);
}
- echo $migrator->last_run_migration['name'] . '<br />';
+ $state = array_merge(array(
+ 'migration_schema_done' => false,
+ 'migration_data_done' => false,
+ ),
+ $migrator->last_run_migration['state']
+ );
+
+ if (isset($migrator->last_run_migration['effectively_installed']) && $migrator->last_run_migration['effectively_installed'])
+ {
+ echo $user->lang('MIGRATION_EFFECTIVELY_INSTALLED', $migrator->last_run_migration['name']) . '<br />';
+ }
+ else
+ {
+ if ($state['migration_data_done'])
+ {
+ echo $user->lang('MIGRATION_DATA_DONE', $migrator->last_run_migration['name']) . '<br />';
+ }
+ else if ($state['migration_schema_done'])
+ {
+ echo $user->lang('MIGRATION_SCHEMA_DONE', $migrator->last_run_migration['name']) . '<br />';
+ }
+ }
// Are we approaching the time limit? If so we want to pause the update and continue after refreshing
if ((time() - $update_start_time) >= $safe_time_limit)
diff --git a/phpBB/language/en/migrator.php b/phpBB/language/en/migrator.php
index 84074c391c..a62da483cf 100644
--- a/phpBB/language/en/migrator.php
+++ b/phpBB/language/en/migrator.php
@@ -40,8 +40,11 @@ $lang = array_merge($lang, array(
'GROUP_NOT_EXIST' => 'The group "%s" unexpectedly does not exist.',
+ 'MIGRATION_DATA_DONE' => 'Installed Data: %s',
+ 'MIGRATION_EFFECTIVELY_INSTALLED' => 'Migration already effectively installed (skipped): %s',
'MIGRATION_EXCEPTION_ERROR' => 'Something went wrong during the request and an exception was thrown. The changes made before the error occurred were reversed to the best of our abilities, but you should check the board for errors.',
'MIGRATION_NOT_FULFILLABLE' => 'The migration "%1$s" is not fulfillable, missing migration "%2$s".',
+ 'MIGRATION_SCHEMA_DONE' => 'Installed Schema: %s',
'MODULE_ALREADY_EXIST' => 'The module "%s" unexpectedly already exists.',
'MODULE_ERROR' => 'An error occured while creating a module: %s',