Skip to content

Commit b00a39b

Browse files
committed
[ticket/14742] Make $last_run_migration protected
PHPBB3-14742
1 parent 6078bae commit b00a39b

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

phpBB/install/database_update.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,6 @@ function phpbb_end_update($cache, $config)
211211
phpbb_end_update($cache, $config);
212212
}
213213

214-
$state = array_merge(array(
215-
'migration_schema_done' => false,
216-
'migration_data_done' => false,
217-
),
218-
$migrator->last_run_migration['state']
219-
);
220-
221214
// Are we approaching the time limit? If so we want to pause the update and continue after refreshing
222215
if ((time() - $update_start_time) >= $safe_time_limit)
223216
{

phpBB/phpbb/db/migrator.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class migrator
8080
*
8181
* @var array
8282
*/
83-
public $last_run_migration = false;
83+
protected $last_run_migration = false;
8484

8585
/**
8686
* The output handler. A null handler is configured by default.
@@ -160,6 +160,19 @@ public function load_migration_state()
160160
$this->db->sql_return_on_error(false);
161161
}
162162

163+
/**
164+
* Get an array with information about the last migration run.
165+
*
166+
* The array contains 'name', 'class' and 'state'. 'effectively_installed' is set
167+
* and set to true if the last migration was effectively_installed.
168+
*
169+
* @return array
170+
*/
171+
public function get_last_run_migration()
172+
{
173+
return $this->last_run_migration;
174+
}
175+
163176
/**
164177
* Sets the list of available migration class names to the given array.
165178
*

0 commit comments

Comments
 (0)