diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2016-08-21 09:44:37 +0200 | 
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2016-08-21 09:44:37 +0200 | 
| commit | 76748183bb46d111d7cc36f683385ecae70721e7 (patch) | |
| tree | b8aade382cdf3718ecff6450089d8f2e9fdc3d9e /phpBB/phpbb/install/module/update_database/task | |
| parent | 723d9d8e4c9f397eab7af77e6e6bd851354a9dcd (diff) | |
| parent | a37f10ae0951f16b115f4a175cc546a515cf7937 (diff) | |
| download | forums-76748183bb46d111d7cc36f683385ecae70721e7.tar forums-76748183bb46d111d7cc36f683385ecae70721e7.tar.gz forums-76748183bb46d111d7cc36f683385ecae70721e7.tar.bz2 forums-76748183bb46d111d7cc36f683385ecae70721e7.tar.xz forums-76748183bb46d111d7cc36f683385ecae70721e7.zip  | |
Merge pull request #4420 from Elsensee/ticket/14742-32x
[ticket/14742-32x] Further improvements to migrator
Diffstat (limited to 'phpBB/phpbb/install/module/update_database/task')
| -rw-r--r-- | phpBB/phpbb/install/module/update_database/task/update.php | 14 | 
1 files changed, 10 insertions, 4 deletions
diff --git a/phpBB/phpbb/install/module/update_database/task/update.php b/phpBB/phpbb/install/module/update_database/task/update.php index c69dafaa10..9d7ba2f919 100644 --- a/phpBB/phpbb/install/module/update_database/task/update.php +++ b/phpBB/phpbb/install/module/update_database/task/update.php @@ -158,18 +158,23 @@ class update extends task_base  			try  			{  				$this->migrator->update(); +				$progress_count++;  				$last_run_migration = $this->migrator->get_last_run_migration();  				if (isset($last_run_migration['effectively_installed']) && $last_run_migration['effectively_installed'])  				{ -					$progress_count += 2; +					// We skipped two step, so increment $progress_count by another one +					$progress_count++;  				} -				else if (($last_run_migration['task'] === 'process_schema_step' && $last_run_migration['state']['migration_schema_done']) || -					($last_run_migration['task'] === 'process_data_step' && $last_run_migration['state']['migration_data_done'])) +				else if (($last_run_migration['task'] === 'process_schema_step' && !$last_run_migration['state']['migration_schema_done']) || +					($last_run_migration['task'] === 'process_data_step' && !$last_run_migration['state']['migration_data_done']))  				{ -					$progress_count++; +					// We just run a step that wasn't counted yet so make it count +					$migration_step_count++;  				} +				$this->iohandler->set_task_count($migration_step_count); +				$this->installer_config->set_task_progress_count($migration_step_count);  				$this->iohandler->set_progress('STAGE_UPDATE_DATABASE', $progress_count);  			}  			catch (exception $e) @@ -184,6 +189,7 @@ class update extends task_base  			if ($this->installer_config->get_time_remaining() <= 0 || $this->installer_config->get_memory_remaining() <= 0)  			{  				$this->installer_config->set('database_update_count', $progress_count); +				$this->installer_config->set('database_update_migration_steps', $migration_step_count);  				throw new resource_limit_reached_exception();  			}  		}  | 
