mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 22:08:54 +00:00
[ticket/11459] Fix missing constant CONFIG_TABLE for sql_create_index()
PHPBB3-11459
This commit is contained in:
parent
959e9beedc
commit
f30b9dbfba
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue