diff --git a/libraries/classes/ConfigStorage/Relation.php b/libraries/classes/ConfigStorage/Relation.php index 8774a9cd56..328bfc2b77 100644 --- a/libraries/classes/ConfigStorage/Relation.php +++ b/libraries/classes/ConfigStorage/Relation.php @@ -1456,7 +1456,7 @@ class Relation * * @return array 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; } diff --git a/test/classes/ConfigStorage/RelationTest.php b/test/classes/ConfigStorage/RelationTest.php index 899c4eefae..8d55bd508e 100644 --- a/test/classes/ConfigStorage/RelationTest.php +++ b/test/classes/ConfigStorage/RelationTest.php @@ -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']), ); }