From a0eb7603ce26a3df677ceda0b313170e5e5f7c05 Mon Sep 17 00:00:00 2001 From: Guillaume Barral Date: Wed, 4 Jun 2014 08:40:17 +0200 Subject: [PATCH] correction of the method performAdditionalUpdateAction --- .../Thelia/Controller/Admin/ProductController.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/lib/Thelia/Controller/Admin/ProductController.php b/core/lib/Thelia/Controller/Admin/ProductController.php index 4cbfbad42..2f232fdc5 100644 --- a/core/lib/Thelia/Controller/Admin/ProductController.php +++ b/core/lib/Thelia/Controller/Admin/ProductController.php @@ -15,6 +15,7 @@ namespace Thelia\Controller\Admin; use Symfony\Component\HttpFoundation\JsonResponse; use Propel\Runtime\ActiveQuery\Criteria; +use Symfony\Component\HttpFoundation\RedirectResponse; use Thelia\Core\Event\FeatureProduct\FeatureProductDeleteEvent; use Thelia\Core\Event\FeatureProduct\FeatureProductUpdateEvent; use Thelia\Core\Event\TheliaEvents; @@ -443,6 +444,19 @@ class ProductController extends AbstractSeoCrudController ); } + protected function performAdditionalUpdateAction($updateEvent) + { + if ($this->getRequest()->get('save_mode') != 'stay') { + + $response = new RedirectResponse($this->getRoute('admin.categories.default', array( + 'category_id' => $this->getCategoryId(), + 'page' => $this->getRequest()->get('page', 1) + ))); + + return $response; + } + } + protected function performAdditionalUpdatePositionAction($positionEvent) { // Redirect to parent product list