diff options
| author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-02-02 21:16:37 +0100 |
|---|---|---|
| committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-02-02 21:16:37 +0100 |
| commit | 4133d8a5f15451a00f2f1ed6a4154591ae7f908a (patch) | |
| tree | 03f088e46842b7fd68281c432abd503829e21179 /phpBB/phpbb/install/module/install_database | |
| parent | 154c7500ea1852b1269d687c03bca4251c9c5bb0 (diff) | |
| parent | 8f4889da58e0aa4779ec6bf7c0e747c26a13aee3 (diff) | |
| download | forums-4133d8a5f15451a00f2f1ed6a4154591ae7f908a.tar forums-4133d8a5f15451a00f2f1ed6a4154591ae7f908a.tar.gz forums-4133d8a5f15451a00f2f1ed6a4154591ae7f908a.tar.bz2 forums-4133d8a5f15451a00f2f1ed6a4154591ae7f908a.tar.xz forums-4133d8a5f15451a00f2f1ed6a4154591ae7f908a.zip | |
Merge pull request #4156 from CHItA/ticket/14445
[ticket/14445] Force refresh before schema generation
* CHItA/ticket/14445:
[ticket/14445] Force refresh before schema generation
Diffstat (limited to 'phpBB/phpbb/install/module/install_database')
| -rw-r--r-- | phpBB/phpbb/install/module/install_database/task/create_schema.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/phpbb/install/module/install_database/task/create_schema.php b/phpBB/phpbb/install/module/install_database/task/create_schema.php index cabb78787f..a5635d5dbe 100644 --- a/phpBB/phpbb/install/module/install_database/task/create_schema.php +++ b/phpBB/phpbb/install/module/install_database/task/create_schema.php @@ -13,6 +13,8 @@ namespace phpbb\install\module\install_database\task; +use phpbb\install\exception\resource_limit_reached_exception; + /** * Create database schema */ @@ -106,6 +108,17 @@ class create_schema extends \phpbb\install\task_base */ public function run() { + // As this task may take a large amount of time to complete refreshing the page might be necessary for some + // server configurations with limited resources + if (!$this->config->get('pre_schema_forced_refresh')) + { + if ($this->config->get_time_remaining() < 5) + { + $this->config->set('pre_schema_forced_refresh', true); + throw new resource_limit_reached_exception(); + } + } + $this->db->sql_return_on_error(true); $dbms = $this->config->get('dbms'); |
