mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
DatabaseCreationPage: Prefer our form error implementation
This commit is contained in:
parent
e43abd37a1
commit
2b11168673
@ -155,7 +155,7 @@ class DatabaseCreationPage extends Form
|
|||||||
$db->connectToHost(); // Are we able to login on the server?
|
$db->connectToHost(); // Are we able to login on the server?
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
// We are NOT able to login on the server..
|
// We are NOT able to login on the server..
|
||||||
$this->addError($e->getMessage());
|
$this->error($e->getMessage());
|
||||||
$this->addSkipValidationCheckbox();
|
$this->addSkipValidationCheckbox();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -164,7 +164,7 @@ class DatabaseCreationPage extends Form
|
|||||||
// In case we are connected the credentials filled into this
|
// In case we are connected the credentials filled into this
|
||||||
// form need to be granted to create databases, users...
|
// form need to be granted to create databases, users...
|
||||||
if (false === $db->checkPrivileges($this->databaseSetupPrivileges)) {
|
if (false === $db->checkPrivileges($this->databaseSetupPrivileges)) {
|
||||||
$this->addError(
|
$this->error(
|
||||||
$this->translate('The provided credentials cannot be used to create the database and/or the user.')
|
$this->translate('The provided credentials cannot be used to create the database and/or the user.')
|
||||||
);
|
);
|
||||||
$this->addSkipValidationCheckbox();
|
$this->addSkipValidationCheckbox();
|
||||||
@ -173,7 +173,7 @@ class DatabaseCreationPage extends Form
|
|||||||
|
|
||||||
// ...and to grant all required usage privileges to others
|
// ...and to grant all required usage privileges to others
|
||||||
if (false === $db->isGrantable($this->databaseUsagePrivileges)) {
|
if (false === $db->isGrantable($this->databaseUsagePrivileges)) {
|
||||||
$this->addError(sprintf(
|
$this->error(sprintf(
|
||||||
$this->translate(
|
$this->translate(
|
||||||
'The provided credentials cannot be used to grant all required privileges to the login "%s".'
|
'The provided credentials cannot be used to grant all required privileges to the login "%s".'
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user