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()
)->set('object_name', $newname);
if ($new->store()) {
$this->setSuccessUrl(
'director/' . strtolower($object->getShortTableName()),
$new->getUrlParams()
);
if ($new->store()) {
$this->redirectOnSuccess($msg);
} else {
$this->redirectOnFailure($msg);