diff --git a/application/controllers/TlsclientidentityController.php b/application/controllers/TlsclientidentityController.php index 55c01e29c..17ff1f4f1 100644 --- a/application/controllers/TlsclientidentityController.php +++ b/application/controllers/TlsclientidentityController.php @@ -88,7 +88,9 @@ class TlsclientidentityController extends Controller $clientIdentities->resolvePath($fileName, true); $this->view->form = $form = new ConfirmRemovalForm(); - $form->setOnSuccess(function (ConfirmRemovalForm $form) use ($name, $fileName, $clientIdentities) { + $form + ->setRedirectUrl('config/tls') + ->setOnSuccess(function (ConfirmRemovalForm $form) use ($name, $fileName, $clientIdentities) { foreach (Hook::all('TlsClientIdentity') as $hook) { /** @var Hook\TlsClientIdentityHook $hook */ @@ -112,7 +114,6 @@ class TlsclientidentityController extends Controller ); return true; }) - ->setRedirectUrl('config/tls') ->handleRequest(); $this->addTitleTab( diff --git a/application/controllers/TlsrootcacollectionController.php b/application/controllers/TlsrootcacollectionController.php index 1f4851dcc..9122df8af 100644 --- a/application/controllers/TlsrootcacollectionController.php +++ b/application/controllers/TlsrootcacollectionController.php @@ -78,7 +78,7 @@ class TlsrootcacollectionController extends Controller $cert['removalForm']->handleRequest(); } - usort($certs, function($a, $b) { + usort($certs, function ($a, $b) { $a = $a['info']['name']; $b = $b['info']['name']; @@ -106,7 +106,8 @@ class TlsrootcacollectionController extends Controller $rootCaCollections->resolvePath($fileName, true); $this->view->form = $form = new ConfirmRemovalForm(); - $form->setOnSuccess(function (ConfirmRemovalForm $form) use ($name, $fileName, $rootCaCollections) { + $form->setRedirectUrl('config/tls') + ->setOnSuccess(function (ConfirmRemovalForm $form) use ($name, $fileName, $rootCaCollections) { foreach (Hook::all('TlsRootCACertificateCollection') as $hook) { /** @var Hook\TlsRootCACertificateCollectionHook $hook */ @@ -130,7 +131,6 @@ class TlsrootcacollectionController extends Controller ); return true; }) - ->setRedirectUrl('config/tls') ->handleRequest(); $this->addTitleTab(