aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Schramm <oliver.schramm97@gmail.com>2016-08-11 15:37:53 +0200
committerOliver Schramm <oliver.schramm97@gmail.com>2016-08-11 17:59:51 +0200
commitb00a39b9adeca86f2c2777a74d6f4f8325ee7743 (patch)
tree4e6389834954f8803057f8bad436c50ae75a09f5
parent6078bae7f8888f6c1d8bdc9a409b3e0a9cb3cc49 (diff)
downloadforums-b00a39b9adeca86f2c2777a74d6f4f8325ee7743.tar
forums-b00a39b9adeca86f2c2777a74d6f4f8325ee7743.tar.gz
forums-b00a39b9adeca86f2c2777a74d6f4f8325ee7743.tar.bz2
forums-b00a39b9adeca86f2c2777a74d6f4f8325ee7743.tar.xz
forums-b00a39b9adeca86f2c2777a74d6f4f8325ee7743.zip
[ticket/14742] Make $last_run_migration protected
PHPBB3-14742
-rw-r--r--phpBB/install/database_update.php7
-rw-r--r--phpBB/phpbb/db/migrator.php15
2 files changed, 14 insertions, 8 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 0ea6eeffd7..f367ae1fc0 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -211,13 +211,6 @@ while (!$migrator->finished())
phpbb_end_update($cache, $config);
}
- $state = array_merge(array(
- 'migration_schema_done' => false,
- 'migration_data_done' => false,
- ),
- $migrator->last_run_migration['state']
- );
-
// 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/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index aaa7769cee..965d117b0b 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -80,7 +80,7 @@ class migrator
*
* @var array
*/
- public $last_run_migration = false;
+ protected $last_run_migration = false;
/**
* The output handler. A null handler is configured by default.
@@ -161,6 +161,19 @@ class migrator
}
/**
+ * Get an array with information about the last migration run.
+ *
+ * The array contains 'name', 'class' and 'state'. 'effectively_installed' is set
+ * and set to true if the last migration was effectively_installed.
+ *
+ * @return array
+ */
+ public function get_last_run_migration()
+ {
+ return $this->last_run_migration;
+ }
+
+ /**
* Sets the list of available migration class names to the given array.
*
* @param array $class_names An array of migration class names