diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-07-19 14:36:00 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-07-20 23:15:34 +0200 |
commit | 919aeb387929a4b775024914eed95207111791b0 (patch) | |
tree | 2c372f3ba91027c2ceaa813fa124d8d59fd17159 /phpBB/phpbb | |
parent | d5f87e605374e5e91e06ad652f416d9a666999ff (diff) | |
download | forums-919aeb387929a4b775024914eed95207111791b0.tar forums-919aeb387929a4b775024914eed95207111791b0.tar.gz forums-919aeb387929a4b775024914eed95207111791b0.tar.bz2 forums-919aeb387929a4b775024914eed95207111791b0.tar.xz forums-919aeb387929a4b775024914eed95207111791b0.zip |
[ticket/12873] Test the good identifier in \phpbb\db\tools
We need to rename the index key because with the default prefix (phpbb_)
this key has a length of 31. And because we don't accept the keys longer
than 30 characters we should ensure that by default no key is longer than
30 characters.
PHPBB3-12873
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/db/migration/data/v30x/release_3_0_0.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/db/tools.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/phpbb/db/migration/data/v30x/release_3_0_0.php b/phpBB/phpbb/db/migration/data/v30x/release_3_0_0.php index 26937d6d80..b3da3a831d 100644 --- a/phpBB/phpbb/db/migration/data/v30x/release_3_0_0.php +++ b/phpBB/phpbb/db/migration/data/v30x/release_3_0_0.php @@ -731,7 +731,7 @@ class release_3_0_0 extends \phpbb\db\migration\migration 'title_match' => array('BOOL', 0), ), 'KEYS' => array( - 'unq_mtch' => array('UNIQUE', array('word_id', 'post_id', 'title_match')), + 'un_mtch' => array('UNIQUE', array('word_id', 'post_id', 'title_match')), 'word_id' => array('INDEX', 'word_id'), 'post_id' => array('INDEX', 'post_id'), ), diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php index 18defc4535..10eb517d90 100644 --- a/phpBB/phpbb/db/tools.php +++ b/phpBB/phpbb/db/tools.php @@ -2079,7 +2079,7 @@ class tools $statements = array(); $table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config) - if (strlen($table_name . $index_name) - strlen($table_prefix) > 24) + if (strlen($table_name . '_' . $index_name) - strlen($table_prefix) > 24) { $max_length = strlen($table_prefix) + 24; trigger_error("Index name '{$table_name}_$index_name' on table '$table_name' is too long. The maximum is $max_length characters.", E_USER_ERROR); |