Improve method name
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
parent
cd9ca8419a
commit
9fcafd2504
@ -1456,7 +1456,7 @@ class Relation
|
||||
*
|
||||
* @return array<string, string> table name, create query
|
||||
*/
|
||||
public function getDefaultPmaTableNames(array $tableNameReplacements): array
|
||||
public function getCreateTableSqlQueries(array $tableNameReplacements): array
|
||||
{
|
||||
$pmaTables = [];
|
||||
$createTablesFile = (string) file_get_contents(SQL_DIR . 'create_tables.sql');
|
||||
@ -1555,7 +1555,7 @@ class Relation
|
||||
|
||||
$createQueries = [];
|
||||
if ($create) {
|
||||
$createQueries = $this->getDefaultPmaTableNames($tableNameReplacements);
|
||||
$createQueries = $this->getCreateTableSqlQueries($tableNameReplacements);
|
||||
if (! $this->dbi->selectDb($db, Connection::TYPE_CONTROL)) {
|
||||
$GLOBALS['message'] = $this->dbi->getError(Connection::TYPE_CONTROL);
|
||||
|
||||
@ -1590,6 +1590,7 @@ class Relation
|
||||
continue;
|
||||
}
|
||||
|
||||
// Fill it with the default table name
|
||||
$GLOBALS['cfg']['Server'][$feature] = $table;
|
||||
}
|
||||
|
||||
|
||||
@ -1376,7 +1376,7 @@ class RelationTest extends AbstractTestCase
|
||||
|
||||
$this->assertSame(
|
||||
$data,
|
||||
$relation->getDefaultPmaTableNames([]),
|
||||
$relation->getCreateTableSqlQueries([]),
|
||||
);
|
||||
|
||||
$data['pma__export_templates'] = implode("\n", [
|
||||
@ -1403,7 +1403,7 @@ class RelationTest extends AbstractTestCase
|
||||
|
||||
$this->assertSame(
|
||||
$data,
|
||||
$relation->getDefaultPmaTableNames(['pma__export_templates' => 'db_exporttemplates_pma']),
|
||||
$relation->getCreateTableSqlQueries(['pma__export_templates' => 'db_exporttemplates_pma']),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user