Form: Improve code readability..

..and avoid the necessity to provide another mock when testing
Form::handleRequest().

refs #8758
This commit is contained in:
Johannes Meyer 2015-07-21 16:48:56 +02:00
parent 5e1ea958b4
commit 8f2849f32a

View File

@ -965,9 +965,9 @@ class Form extends Zend_Form
|| ($this->onSuccess === null && false !== $this->onSuccess()))) { || ($this->onSuccess === null && false !== $this->onSuccess()))) {
if (! $frameUpload) { if (! $frameUpload) {
$this->getResponse()->redirectAndExit($this->getRedirectUrl()); $this->getResponse()->redirectAndExit($this->getRedirectUrl());
} else {
$this->getView()->layout()->redirectUrl = $this->getRedirectUrl()->getAbsoluteUrl();
} }
$this->getView()->layout()->redirectUrl = $this->getRedirectUrl()->getAbsoluteUrl();
} }
} elseif ($this->getValidatePartial()) { } elseif ($this->getValidatePartial()) {
// The form can't be processed but we may want to show validation errors though // The form can't be processed but we may want to show validation errors though