IcingaCloneObjectForm: get cloned id AFTER store

fixes #11856
This commit is contained in:
Thomas Gelf 2016-08-24 14:49:11 +00:00
parent b8b047a1e4
commit 8c42e0f7d6

View File

@ -51,12 +51,12 @@ class IcingaCloneObjectForm extends QuickForm
$object->getConnection() $object->getConnection()
)->set('object_name', $newname); )->set('object_name', $newname);
if ($new->store()) {
$this->setSuccessUrl( $this->setSuccessUrl(
'director/' . strtolower($object->getShortTableName()), 'director/' . strtolower($object->getShortTableName()),
$new->getUrlParams() $new->getUrlParams()
); );
if ($new->store()) {
$this->redirectOnSuccess($msg); $this->redirectOnSuccess($msg);
} else { } else {
$this->redirectOnFailure($msg); $this->redirectOnFailure($msg);