mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 03:18:52 +00:00
[ticket/14992] Correctly remove table name and prefix from keys
PHPBB3-14992
This commit is contained in:
parent
11f968e774
commit
bcc85ab679
1 changed files with 13 additions and 1 deletions
|
@ -947,7 +947,19 @@ class tools implements tools_interface
|
|||
case 'oracle':
|
||||
case 'sqlite3':
|
||||
$index_name = $this->check_index_name_length($table_name, $table_name . '_' . $index_name, false);
|
||||
$row[$col] = strpos($row[$col], $table_name) === 0 ? substr($row[$col], strlen($table_name) + 1) : $row[$col];
|
||||
$table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config)
|
||||
|
||||
if (strpos($index_name , $table_name) === false)
|
||||
{
|
||||
if (strpos($index_name, $table_prefix) !== false)
|
||||
{
|
||||
$row[$col] = substr($row[$col], strlen($table_prefix) + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$row[$col] = substr($row[$col], strlen($table_name) + 1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue