aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/install/module
diff options
context:
space:
mode:
authorMate Bartus <mate.bartus@gmail.com>2016-02-02 17:16:15 +0100
committerMate Bartus <mate.bartus@gmail.com>2016-02-02 19:48:06 +0100
commit8f4889da58e0aa4779ec6bf7c0e747c26a13aee3 (patch)
treec4407ea949e1cdbfb6181edc476692b2dc50093e /phpBB/phpbb/install/module
parent63fd2159e015a36c778115c943cca2d11bcb46e1 (diff)
downloadforums-8f4889da58e0aa4779ec6bf7c0e747c26a13aee3.tar
forums-8f4889da58e0aa4779ec6bf7c0e747c26a13aee3.tar.gz
forums-8f4889da58e0aa4779ec6bf7c0e747c26a13aee3.tar.bz2
forums-8f4889da58e0aa4779ec6bf7c0e747c26a13aee3.tar.xz
forums-8f4889da58e0aa4779ec6bf7c0e747c26a13aee3.zip
[ticket/14445] Force refresh before schema generation
PHPBB3-14445
Diffstat (limited to 'phpBB/phpbb/install/module')
-rw-r--r--phpBB/phpbb/install/module/install_database/task/create_schema.php13
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');