Remove CentralColumns::configErrorMessage method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
a6df16e8dd
commit
5050553567
@ -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);
|
||||
|
||||
@ -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
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user