From 5b9ba4e7e44d1f144f9a9a585ef10e39485ca06a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 20 Mar 2016 11:38:19 +0100 Subject: [PATCH] IcingaCloneObjectForm: fix redirection url --- application/forms/IcingaCloneObjectForm.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/forms/IcingaCloneObjectForm.php b/application/forms/IcingaCloneObjectForm.php index b8ed0786..edf97d68 100644 --- a/application/forms/IcingaCloneObjectForm.php +++ b/application/forms/IcingaCloneObjectForm.php @@ -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 {