aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-03-29 10:28:44 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-03-29 11:03:44 +0100
commitf30b9dbfba04ee1fd352d7cd6e4431001b991a6f (patch)
tree1eacd9dc1e4f757eda13220a2c6ba15e900f82e6 /phpBB/install
parent959e9beedcfb099e408b2987a7bfd316e3e253db (diff)
downloadforums-f30b9dbfba04ee1fd352d7cd6e4431001b991a6f.tar
forums-f30b9dbfba04ee1fd352d7cd6e4431001b991a6f.tar.gz
forums-f30b9dbfba04ee1fd352d7cd6e4431001b991a6f.tar.bz2
forums-f30b9dbfba04ee1fd352d7cd6e4431001b991a6f.tar.xz
forums-f30b9dbfba04ee1fd352d7cd6e4431001b991a6f.zip
[ticket/11459] Fix missing constant CONFIG_TABLE for sql_create_index()
PHPBB3-11459
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/install_install.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 7c260017cd..c749b54f40 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1171,6 +1171,14 @@ class install_install extends module
$db_table_schema = @file_get_contents('schemas/schema.json');
$db_table_schema = json_decode($db_table_schema, true);
+ if (!defined('CONFIG_TABLE'))
+ {
+ // CONFIG_TABLE is required by sql_create_index() to check the
+ // length of index names. However table_prefix is not defined
+ // here yet, so we need to create the constant ourselves.
+ define('CONFIG_TABLE', $data['table_prefix'] . 'config');
+ }
+
$db_tools = new \phpbb\db\tools($db);
foreach ($db_table_schema as $table_name => $table_data)
{