IcingaCloneObjectForm: fix redirection url
This commit is contained in:
parent
343e5a8669
commit
5b9ba4e7e4
|
@ -39,11 +39,6 @@ class IcingaCloneObjectForm extends QuickForm
|
|||
$newname = $this->getValue('new_object_name');
|
||||
$resolve = $this->getValue('clone_type') === 'flat';
|
||||
|
||||
$this->setSuccessUrl(
|
||||
'director/' . strtolower($object->getShortTableName()),
|
||||
array('name' => $newname)
|
||||
);
|
||||
|
||||
$msg = sprintf(
|
||||
'The %s "%s" has been cloned from "%s"',
|
||||
$object->getShortTableName(),
|
||||
|
@ -56,6 +51,11 @@ class IcingaCloneObjectForm extends QuickForm
|
|||
$object->getConnection()
|
||||
)->set('object_name', $newname);
|
||||
|
||||
$this->setSuccessUrl(
|
||||
'director/' . strtolower($object->getShortTableName()),
|
||||
$new->getUrlParams()
|
||||
);
|
||||
|
||||
if ($new->store()) {
|
||||
$this->redirectOnSuccess($msg);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue