DatabaseCreationPage: Prefer our form error implementation

This commit is contained in:
Johannes Meyer 2015-07-02 11:18:29 +02:00
parent e43abd37a1
commit 2b11168673

View File

@ -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".'
), ),