From 07bac9c56bacd6319301f6a67acf963a4a0acaa2 Mon Sep 17 00:00:00 2001 From: bMancone Date: Mon, 5 Dec 2011 15:11:24 +0000 Subject: [PATCH] // AdminSupplyOrders: fixed permissions git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10926 b9a71923-0436-4b27-9f14-aed3839534dd --- .../admin/AdminSupplyOrdersController.php | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/controllers/admin/AdminSupplyOrdersController.php b/controllers/admin/AdminSupplyOrdersController.php index c1154524b..281997c3a 100644 --- a/controllers/admin/AdminSupplyOrdersController.php +++ b/controllers/admin/AdminSupplyOrdersController.php @@ -340,13 +340,7 @@ class AdminSupplyOrdersControllerCore extends AdminController $this->tpl_list_vars['current_warehouse'] = $this->getCurrentWarehouse(); $this->tpl_list_vars['filter_status'] = $this->getFilterStatus(); - - // access - if (!($this->tabAccess['add'] === '1')) - unset($this->toolbar_btn['new']); - - unset($this->toolbar_btn['new']); - + // adds export csv buttons $this->toolbar_btn['export-csv-orders'] = array( 'short' => 'Export Orders', 'href' => $this->context->link->getAdminLink('AdminSupplyOrders').'&csv_orders', @@ -359,10 +353,15 @@ class AdminSupplyOrdersControllerCore extends AdminController 'desc' => $this->l('Export Orders Details (CSV)'), ); - $this->toolbar_btn['new'] = array( - 'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token, - 'desc' => $this->l('Add new') - ); + // access + unset($this->toolbar_btn['new']); + if ($this->tabAccess['add'] === '1') + { + $this->toolbar_btn['new'] = array( + 'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token, + 'desc' => $this->l('Add new') + ); + } // overrides query $this->_select = '