From 2d957205eff8103e155cf90677854eabc94578de Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 19 Jan 2015 13:47:53 +0100 Subject: [PATCH] Using $this when not in object context, doesn't work. refs #7551 --- application/forms/Config/Authentication/DbBackendForm.php | 4 ++-- application/forms/Config/Authentication/LdapBackendForm.php | 2 +- application/forms/Config/Resource/DbResourceForm.php | 2 +- application/forms/Config/Resource/LdapResourceForm.php | 2 +- application/forms/Config/Resource/LivestatusResourceForm.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/application/forms/Config/Authentication/DbBackendForm.php b/application/forms/Config/Authentication/DbBackendForm.php index f8a4fb832..d3a5af51d 100644 --- a/application/forms/Config/Authentication/DbBackendForm.php +++ b/application/forms/Config/Authentication/DbBackendForm.php @@ -109,11 +109,11 @@ class DbBackendForm extends Form try { $dbUserBackend = new DbUserBackend(ResourceFactory::createResource($form->getResourceConfig())); 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; } } 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; } diff --git a/application/forms/Config/Authentication/LdapBackendForm.php b/application/forms/Config/Authentication/LdapBackendForm.php index 5915a0a10..1b8fc3f11 100644 --- a/application/forms/Config/Authentication/LdapBackendForm.php +++ b/application/forms/Config/Authentication/LdapBackendForm.php @@ -150,7 +150,7 @@ class LdapBackendForm extends Form $form->addError($e->getMessage()); return false; } 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; } diff --git a/application/forms/Config/Resource/DbResourceForm.php b/application/forms/Config/Resource/DbResourceForm.php index 9e4027299..97dd951d1 100644 --- a/application/forms/Config/Resource/DbResourceForm.php +++ b/application/forms/Config/Resource/DbResourceForm.php @@ -133,7 +133,7 @@ class DbResourceForm extends Form $resource->getConnection()->getConnection(); } catch (Exception $e) { $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; } diff --git a/application/forms/Config/Resource/LdapResourceForm.php b/application/forms/Config/Resource/LdapResourceForm.php index c113e2471..3293546c5 100644 --- a/application/forms/Config/Resource/LdapResourceForm.php +++ b/application/forms/Config/Resource/LdapResourceForm.php @@ -124,7 +124,7 @@ class LdapResourceForm extends Form } } catch (Exception $e) { $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; } diff --git a/application/forms/Config/Resource/LivestatusResourceForm.php b/application/forms/Config/Resource/LivestatusResourceForm.php index 996827228..e893a4657 100644 --- a/application/forms/Config/Resource/LivestatusResourceForm.php +++ b/application/forms/Config/Resource/LivestatusResourceForm.php @@ -77,7 +77,7 @@ class LivestatusResourceForm extends Form $resource->connect()->disconnect(); } catch (Exception $_) { $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; }