diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-05-01 13:00:43 -0500 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-05-01 13:00:43 -0500 |
commit | 9db4e856db426c68d0e3055dbcad9754ce65779d (patch) | |
tree | 757834dff6848a8b1d3bdce037c7c9939e283397 /phpBB/includes/extension | |
parent | c182ab0e7b2739ff70fb18611af5e1baa02d81a2 (diff) | |
download | forums-9db4e856db426c68d0e3055dbcad9754ce65779d.tar forums-9db4e856db426c68d0e3055dbcad9754ce65779d.tar.gz forums-9db4e856db426c68d0e3055dbcad9754ce65779d.tar.bz2 forums-9db4e856db426c68d0e3055dbcad9754ce65779d.tar.xz forums-9db4e856db426c68d0e3055dbcad9754ce65779d.zip |
[ticket/11415] Move while loop from ext manager to acp_extensions.php
Now enable_step works as it's supposed to (do one step at a time) and
less refreshes are required for the user.
PHPBB3-11415
Diffstat (limited to 'phpBB/includes/extension')
-rw-r--r-- | phpBB/includes/extension/manager.php | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/phpBB/includes/extension/manager.php b/phpBB/includes/extension/manager.php index a1022762b8..d3e9d56501 100644 --- a/phpBB/includes/extension/manager.php +++ b/phpBB/includes/extension/manager.php @@ -546,22 +546,11 @@ class phpbb_extension_manager $migrations = $finder->get_classes_from_files($migrations); $this->migrator->set_migrations($migrations); - // What is a safe limit of execution time? Half the max execution time should be safe. - $safe_time_limit = (ini_get('max_execution_time') / 2); - $start_time = time(); - if ($mode == 'enable') { - while (!$this->migrator->finished()) - { - $this->migrator->update(); + $this->migrator->update(); - // Are we approaching the time limit? If so we want to pause the update and continue after refreshing - if ((time() - $start_time) >= $safe_time_limit) - { - return false; - } - } + return $this->migrator->finished(); } else if ($mode == 'purge') { @@ -571,11 +560,7 @@ class phpbb_extension_manager { $this->migrator->revert($migration); - // Are we approaching the time limit? If so we want to pause the update and continue after refreshing - if ((time() - $start_time) >= $safe_time_limit) - { - return false; - } + return false; } } } |