From cbbc82ac8631e00b4d41b9cb8635bfd1b9f14073 Mon Sep 17 00:00:00 2001 From: Giuseppe Montuoro Date: Sun, 21 Jun 2020 00:04:57 +0200 Subject: [PATCH] Use the current context when making redirects in FormController onSave handlers (#5132) Related: https://github.com/octobercms/october/commit/d0546599d1b1871bc558d6a0f146dbe9ffcf7b48 --- modules/backend/behaviors/FormController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/backend/behaviors/FormController.php b/modules/backend/behaviors/FormController.php index b918a89c3..e7858b63a 100644 --- a/modules/backend/behaviors/FormController.php +++ b/modules/backend/behaviors/FormController.php @@ -258,7 +258,7 @@ class FormController extends ControllerBehavior Flash::success($this->getLang("{$this->context}[flashSave]", 'backend::lang.form.create_success')); - if ($redirect = $this->makeRedirect('create', $model)) { + if ($redirect = $this->makeRedirect($this->context, $model)) { return $redirect; } } @@ -326,7 +326,7 @@ class FormController extends ControllerBehavior Flash::success($this->getLang("{$this->context}[flashSave]", 'backend::lang.form.update_success')); - if ($redirect = $this->makeRedirect('update', $model)) { + if ($redirect = $this->makeRedirect($this->context, $model)) { return $redirect; } }