Using $this when not in object context, doesn't work.

refs #7551
This commit is contained in:
Johannes Meyer 2015-01-19 13:47:53 +01:00
parent 7082ebaf7b
commit 2d957205ef
5 changed files with 6 additions and 6 deletions

View File

@ -109,11 +109,11 @@ class DbBackendForm extends Form
try { try {
$dbUserBackend = new DbUserBackend(ResourceFactory::createResource($form->getResourceConfig())); $dbUserBackend = new DbUserBackend(ResourceFactory::createResource($form->getResourceConfig()));
if ($dbUserBackend->count() < 1) { if ($dbUserBackend->count() < 1) {
$form->addError($this->translate('No users found under the specified database backend')); $form->addError($form->translate('No users found under the specified database backend'));
return false; return false;
} }
} catch (Exception $e) { } catch (Exception $e) {
$form->addError(sprintf($this->translate('Using the specified backend failed: %s'), $e->getMessage())); $form->addError(sprintf($form->translate('Using the specified backend failed: %s'), $e->getMessage()));
return false; return false;
} }

View File

@ -150,7 +150,7 @@ class LdapBackendForm extends Form
$form->addError($e->getMessage()); $form->addError($e->getMessage());
return false; return false;
} catch (Exception $e) { } catch (Exception $e) {
$form->addError(sprintf($this->translate('Unable to validate authentication: %s'), $e->getMessage())); $form->addError(sprintf($form->translate('Unable to validate authentication: %s'), $e->getMessage()));
return false; return false;
} }

View File

@ -133,7 +133,7 @@ class DbResourceForm extends Form
$resource->getConnection()->getConnection(); $resource->getConnection()->getConnection();
} catch (Exception $e) { } catch (Exception $e) {
$form->addError( $form->addError(
$this->translate('Connectivity validation failed, connection to the given resource not possible.') $form->translate('Connectivity validation failed, connection to the given resource not possible.')
); );
return false; return false;
} }

View File

@ -124,7 +124,7 @@ class LdapResourceForm extends Form
} }
} catch (Exception $e) { } catch (Exception $e) {
$form->addError( $form->addError(
$this->translate('Connectivity validation failed, connection to the given resource not possible.') $form->translate('Connectivity validation failed, connection to the given resource not possible.')
); );
return false; return false;
} }

View File

@ -77,7 +77,7 @@ class LivestatusResourceForm extends Form
$resource->connect()->disconnect(); $resource->connect()->disconnect();
} catch (Exception $_) { } catch (Exception $_) {
$form->addError( $form->addError(
$this->translate('Connectivity validation failed, connection to the given resource not possible.') $form->translate('Connectivity validation failed, connection to the given resource not possible.')
); );
return false; return false;
} }