diff --git a/libraries/classes/CentralColumns.php b/libraries/classes/CentralColumns.php index 348c904b72..fc9f19f412 100644 --- a/libraries/classes/CentralColumns.php +++ b/libraries/classes/CentralColumns.php @@ -234,20 +234,6 @@ class CentralColumns return $has_list; } - /** - * return error message to be displayed if central columns - * configuration storage is not completely configured - */ - private function configErrorMessage(): Message - { - return Message::error( - __( - 'The configuration storage is not ready for the central list' - . ' of columns feature.' - ) - ); - } - /** * build the insert query for central columns list given PMA storage * db, central_columns table, column name and corresponding definition to be added @@ -315,7 +301,9 @@ class CentralColumns ) { $cfgCentralColumns = $this->getParams(); if (! is_array($cfgCentralColumns)) { - return $this->configErrorMessage(); + return Message::error( + __('The configuration storage is not ready for the central list of columns feature.') + ); } $db = $_POST['db']; $pmadb = $cfgCentralColumns['db']; @@ -437,7 +425,9 @@ class CentralColumns ) { $cfgCentralColumns = $this->getParams(); if (! is_array($cfgCentralColumns)) { - return $this->configErrorMessage(); + return Message::error( + __('The configuration storage is not ready for the central list of columns feature.') + ); } $pmadb = $cfgCentralColumns['db']; $central_list_table = $cfgCentralColumns['table']; @@ -658,7 +648,9 @@ class CentralColumns ) { $cfgCentralColumns = $this->getParams(); if (! is_array($cfgCentralColumns)) { - return $this->configErrorMessage(); + return Message::error( + __('The configuration storage is not ready for the central list of columns feature.') + ); } $centralTable = $cfgCentralColumns['table']; $this->dbi->selectDb($cfgCentralColumns['db'], DatabaseInterface::CONNECT_CONTROL); diff --git a/test/classes/CentralColumnsTest.php b/test/classes/CentralColumnsTest.php index ec02bd3954..550258ad49 100644 --- a/test/classes/CentralColumnsTest.php +++ b/test/classes/CentralColumnsTest.php @@ -678,17 +678,6 @@ class CentralColumnsTest extends AbstractTestCase $this->assertStringContainsString(__('The central list of columns for the current database is empty'), $result); } - /** - * Test for configErrorMessage - */ - public function testConfigErrorMessage(): void - { - $this->assertInstanceOf( - Message::class, - $this->callFunction($this->centralColumns, CentralColumns::class, 'configErrorMessage', []) - ); - } - /** * Test for findExistingColNames */