From 5face77ed4cc8b440ed861ba1a24114985c1aecd Mon Sep 17 00:00:00 2001 From: dMetzger Date: Tue, 21 Feb 2012 08:51:10 +0000 Subject: [PATCH] // BO : Small optimization on the payment page git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13484 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminPaymentController.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/controllers/admin/AdminPaymentController.php b/controllers/admin/AdminPaymentController.php index 70395b6bd..e6a2ca239 100644 --- a/controllers/admin/AdminPaymentController.php +++ b/controllers/admin/AdminPaymentController.php @@ -126,7 +126,17 @@ class AdminPaymentControllerCore extends AdminController } public function renderView() - { + { + $this->toolbar_title = $this->l('Paiement'); + unset($this->toolbar_btn['back']); + + $shop_context = (!Shop::isFeatureActive() || $this->context->shop->getContextType() == Shop::CONTEXT_SHOP); + if (!$shop_context) + { + $this->tpl_view_vars = array('shop_context' => $shop_context); + return parent::renderView(); + } + // link to modules page if (isset($this->payment_modules[0])) $token_modules = Tools::getAdminToken('AdminModules'.(int)Tab::getIdFromClassName('AdminModules').(int)$this->context->employee->id); @@ -188,7 +198,6 @@ class AdminPaymentControllerCore extends AdminController $lists[$key_list] = $list; } - $shop_context = (!Shop::isFeatureActive() || $this->context->shop->getContextType() == Shop::CONTEXT_SHOP); $this->tpl_view_vars = array( 'url_modules' => isset($token_modules) ? 'index.php?tab=AdminModules&token='.$token_modules.'&&filterCategory=payments_gateways' : null, 'display_restrictions' => $display_restrictions, @@ -199,8 +208,6 @@ class AdminPaymentControllerCore extends AdminController 'shop_context' => $shop_context ); - $this->toolbar_title = $this->l('Paiement'); - unset($this->toolbar_btn['back']); return parent::renderView(); } }