From 39bb01b43352a1f6bb561ac0f34371c52754b25b Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 2 Sep 2014 14:35:01 +0200 Subject: [PATCH] Rename Icinga\Web\Form::onShow() to onRequest() onShow() is misleading because at the time this method is being called the form is neither shown nor created. refs #5525 --- .../forms/Config/AuthenticationBackendConfigForm.php | 4 ++-- application/forms/Config/GeneralConfigForm.php | 4 ++-- library/Icinga/Web/Form.php | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/application/forms/Config/AuthenticationBackendConfigForm.php b/application/forms/Config/AuthenticationBackendConfigForm.php index 2a882ff2b..660658404 100644 --- a/application/forms/Config/AuthenticationBackendConfigForm.php +++ b/application/forms/Config/AuthenticationBackendConfigForm.php @@ -231,11 +231,11 @@ class AuthenticationBackendConfigForm extends ConfigForm /** * Populate the form in case an authentication backend is being edited * - * @see Form::onShow() + * @see Form::onRequest() * * @throws ConfigurationError In case the backend name is missing in the request or is invalid */ - public function onShow(Request $request) + public function onRequest(Request $request) { $authBackend = $request->getQuery('auth_backend'); if ($authBackend !== null) { diff --git a/application/forms/Config/GeneralConfigForm.php b/application/forms/Config/GeneralConfigForm.php index 29aac89fb..ea89e1b76 100644 --- a/application/forms/Config/GeneralConfigForm.php +++ b/application/forms/Config/GeneralConfigForm.php @@ -60,9 +60,9 @@ class GeneralConfigForm extends ConfigForm } /** - * @see Form::onShow() + * @see Form::onRequest() */ - public function onShow(Request $request) + public function onRequest(Request $request) { $values = array(); foreach ($this->config as $section => $properties) { diff --git a/library/Icinga/Web/Form.php b/library/Icinga/Web/Form.php index 78755f00b..7f858f26a 100644 --- a/library/Icinga/Web/Form.php +++ b/library/Icinga/Web/Form.php @@ -321,7 +321,7 @@ class Form extends Zend_Form * * @param Request $request The current request */ - public function onShow(Request $request) + public function onRequest(Request $request) { } @@ -439,7 +439,7 @@ class Form extends Zend_Form * Process the given request using this form * * Redirects to the url set with setRedirectUrl() upon success. See onSuccess() - * and onShow() wherewith you can customize the processing logic. + * and onRequest() wherewith you can customize the processing logic. * * @param Request $request The request to be processed * @@ -465,7 +465,7 @@ class Form extends Zend_Form $this->isValidPartial($formData); } } else { - $this->onShow($request); + $this->onRequest($request); } return $request;