From 6d414e45c58bfe48d8fecb6e3c0ff3cf0c7ddccc Mon Sep 17 00:00:00 2001 From: rMalie Date: Tue, 23 Aug 2011 08:54:14 +0000 Subject: [PATCH] // Fix orders with friendly URL and dispatcher git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8157 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Dispatcher.php | 1 + controllers/ParentOrderController.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/Dispatcher.php b/classes/Dispatcher.php index 06f5de8da..1111cee31 100644 --- a/classes/Dispatcher.php +++ b/classes/Dispatcher.php @@ -413,6 +413,7 @@ class DispatcherCore $this->controller = $controller; $this->controller = str_replace('-', '', strtolower($this->controller)); + $_GET['controller'] = $this->controller; return $this->controller; } diff --git a/controllers/ParentOrderController.php b/controllers/ParentOrderController.php index 4ab804988..d24acd761 100644 --- a/controllers/ParentOrderController.php +++ b/controllers/ParentOrderController.php @@ -56,9 +56,9 @@ class ParentOrderControllerCore extends FrontController parent::preProcess(); // Redirect to the good order process - if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 AND Tools::getValue('controller') != 'order') + if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 AND Dispatcher::getInstance()->getController() != 'order') Tools::redirect('index.php?controller=order'); - if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1 AND Tools::getValue('controller') != 'order-opc') + if (Configuration::get('PS_ORDER_PROCESS_TYPE') == 1 AND Dispatcher::getInstance()->getController() != 'order-opc') { if (isset($_GET['step']) AND $_GET['step'] == 3) Tools::redirect('index.php?controller=order-opc&isPaymentStep=true');