diff --git a/controllers/admin/AdminAddressesController.php b/controllers/admin/AdminAddressesController.php index 2f579a095..48ac15bec 100644 --- a/controllers/admin/AdminAddressesController.php +++ b/controllers/admin/AdminAddressesController.php @@ -99,7 +99,7 @@ class AdminAddressesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_address'] = array( 'href' => self::$currentIndex.'&addaddress&token='.$this->token, 'desc' => $this->l('Add new address', null, null, false), diff --git a/controllers/admin/AdminAttachmentsController.php b/controllers/admin/AdminAttachmentsController.php index 8ded2eca2..5547e8817 100644 --- a/controllers/admin/AdminAttachmentsController.php +++ b/controllers/admin/AdminAttachmentsController.php @@ -96,7 +96,7 @@ class AdminAttachmentsControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_attachment'] = array( 'href' => self::$currentIndex.'&addattachment&token='.$this->token, 'desc' => $this->l('Add new attachment', null, null, false), diff --git a/controllers/admin/AdminAttributesGroupsController.php b/controllers/admin/AdminAttributesGroupsController.php index c47cb31e3..87de868f5 100644 --- a/controllers/admin/AdminAttributesGroupsController.php +++ b/controllers/admin/AdminAttributesGroupsController.php @@ -506,7 +506,7 @@ class AdminAttributesGroupsControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_attribute_group'] = array( 'href' => self::$currentIndex.'&addattribute_group&token='.$this->token, 'desc' => $this->l('Add new attribute', null, null, false), diff --git a/controllers/admin/AdminCartRulesController.php b/controllers/admin/AdminCartRulesController.php index 0e21ec140..fa40c81af 100644 --- a/controllers/admin/AdminCartRulesController.php +++ b/controllers/admin/AdminCartRulesController.php @@ -260,7 +260,7 @@ class AdminCartRulesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_cart_rule'] = array( 'href' => self::$currentIndex.'&addcart_rule&token='.$this->token, 'desc' => $this->l('Add new cart rule', null, null, false), diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php index 9cf872c27..7daedf915 100644 --- a/controllers/admin/AdminCartsController.php +++ b/controllers/admin/AdminCartsController.php @@ -168,7 +168,7 @@ class AdminCartsControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['export_cart'] = array( 'href' => self::$currentIndex.'&exportcart&token='.$this->token, 'desc' => $this->l('Export carts', null, null, false), diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php index 5576d3de6..119e8354a 100644 --- a/controllers/admin/AdminCategoriesController.php +++ b/controllers/admin/AdminCategoriesController.php @@ -278,7 +278,7 @@ class AdminCategoriesControllerCore extends AdminController public function initToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->toolbar_btn['new'] = array( 'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token, 'desc' => $this->l('Add New') @@ -317,7 +317,7 @@ class AdminCategoriesControllerCore extends AdminController unset($this->toolbar_btn['new']); } // after adding a category - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $id_category = (Tools::isSubmit('id_category')) ? '&id_parent='.(int)Tools::getValue('id_category') : ''; $this->toolbar_btn['new'] = array( 'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token.$id_category, diff --git a/controllers/admin/AdminContactsController.php b/controllers/admin/AdminContactsController.php index 3d7ae5b25..7136dac08 100644 --- a/controllers/admin/AdminContactsController.php +++ b/controllers/admin/AdminContactsController.php @@ -139,7 +139,7 @@ class AdminContactsControllerCore extends AdminController public function initPageHeaderToolbar() { $this->initToolbar(); - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_contact'] = array( 'href' => self::$currentIndex.'&addcontact&token='.$this->token, 'desc' => $this->l('Add new contact', null, null, false), diff --git a/controllers/admin/AdminCountriesController.php b/controllers/admin/AdminCountriesController.php index becf523cb..f4b7e1e4f 100644 --- a/controllers/admin/AdminCountriesController.php +++ b/controllers/admin/AdminCountriesController.php @@ -120,7 +120,7 @@ class AdminCountriesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_country'] = array( 'href' => self::$currentIndex.'&addcountry&token='.$this->token, 'desc' => $this->l('Add new country', null, null, false), diff --git a/controllers/admin/AdminCurrenciesController.php b/controllers/admin/AdminCurrenciesController.php index 6f6e1ded2..ba3bed966 100644 --- a/controllers/admin/AdminCurrenciesController.php +++ b/controllers/admin/AdminCurrenciesController.php @@ -361,7 +361,7 @@ class AdminCurrenciesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_currency'] = array( 'href' => self::$currentIndex.'&addcurrency&token='.$this->token, 'desc' => $this->l('Add new currency', null, null, false), diff --git a/controllers/admin/AdminEmployeesController.php b/controllers/admin/AdminEmployeesController.php index c736e1865..1a5decb74 100644 --- a/controllers/admin/AdminEmployeesController.php +++ b/controllers/admin/AdminEmployeesController.php @@ -177,7 +177,7 @@ class AdminEmployeesControllerCore extends AdminController { parent::initPageHeaderToolbar(); - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_employee'] = array( 'href' => self::$currentIndex.'&addemployee&token='.$this->token, 'desc' => $this->l('Add new employee', null, null, false), diff --git a/controllers/admin/AdminFeaturesController.php b/controllers/admin/AdminFeaturesController.php index c57d5d807..c94266099 100644 --- a/controllers/admin/AdminFeaturesController.php +++ b/controllers/admin/AdminFeaturesController.php @@ -231,7 +231,7 @@ class AdminFeaturesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_feature'] = array( 'href' => self::$currentIndex.'&addfeature&token='.$this->token, 'desc' => $this->l('Add new room feature', null, null, false), diff --git a/controllers/admin/AdminGendersController.php b/controllers/admin/AdminGendersController.php index 7331a9c4c..894df14ef 100644 --- a/controllers/admin/AdminGendersController.php +++ b/controllers/admin/AdminGendersController.php @@ -97,7 +97,7 @@ class AdminGendersControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_gender'] = array( 'href' => self::$currentIndex.'&addgender&token='.$this->token, 'desc' => $this->l('Add new title', null, null, false), diff --git a/controllers/admin/AdminImagesController.php b/controllers/admin/AdminImagesController.php index 914802c9d..6f9dc7f32 100644 --- a/controllers/admin/AdminImagesController.php +++ b/controllers/admin/AdminImagesController.php @@ -823,7 +823,7 @@ class AdminImagesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_image_type'] = array( 'href' => self::$currentIndex.'&addimage_type&token='.$this->token, 'desc' => $this->l('Add new image type', null, null, false), diff --git a/controllers/admin/AdminLanguagesController.php b/controllers/admin/AdminLanguagesController.php index f655284a7..0f5f60f51 100644 --- a/controllers/admin/AdminLanguagesController.php +++ b/controllers/admin/AdminLanguagesController.php @@ -107,7 +107,7 @@ class AdminLanguagesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_language'] = array( 'href' => self::$currentIndex.'&addlang&token='.$this->token, 'desc' => $this->l('Add new language', null, null, false), diff --git a/controllers/admin/AdminManufacturersController.php b/controllers/admin/AdminManufacturersController.php index 68718fc3d..ea594419e 100644 --- a/controllers/admin/AdminManufacturersController.php +++ b/controllers/admin/AdminManufacturersController.php @@ -109,7 +109,7 @@ class AdminManufacturersControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_manufacturer'] = array( 'href' => self::$currentIndex.'&addmanufacturer&token='.$this->token, 'desc' => $this->l('Add new manufacturer', null, null, false), diff --git a/controllers/admin/AdminMetaController.php b/controllers/admin/AdminMetaController.php index 676bd7a64..af5a251a6 100644 --- a/controllers/admin/AdminMetaController.php +++ b/controllers/admin/AdminMetaController.php @@ -229,7 +229,7 @@ class AdminMetaControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_meta'] = array( 'href' => self::$currentIndex.'&addmeta&token='.$this->token, 'desc' => $this->l('Add a new page', null, null, false), diff --git a/controllers/admin/AdminNormalProductsController.php b/controllers/admin/AdminNormalProductsController.php index c584a46b6..738fbebc5 100644 --- a/controllers/admin/AdminNormalProductsController.php +++ b/controllers/admin/AdminNormalProductsController.php @@ -2610,7 +2610,7 @@ class AdminNormalProductsControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_product'] = array( 'href' => self::$currentIndex.'&addproduct&token='.$this->token, // 'desc' => $this->l('Add new room type', null, null, false), diff --git a/controllers/admin/AdminOrderMessageController.php b/controllers/admin/AdminOrderMessageController.php index b6eb07604..23e4c144c 100644 --- a/controllers/admin/AdminOrderMessageController.php +++ b/controllers/admin/AdminOrderMessageController.php @@ -108,7 +108,7 @@ class AdminOrderMessageControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_order_message'] = array( 'href' => self::$currentIndex.'&addorder_message&token='.$this->token, 'desc' => $this->l('Add new order message'), diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index 9a4a3da7d..36a007cb1 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -360,7 +360,7 @@ class AdminOrdersControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_order'] = array( 'href' => self::$currentIndex.'&addorder&token='.$this->token, 'desc' => $this->l('Add new order', null, null, false), diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index f96439145..c78ee0348 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -2649,7 +2649,7 @@ class AdminProductsControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_product'] = array( 'href' => self::$currentIndex.'&addproduct&token='.$this->token, // 'desc' => $this->l('Add new room type', null, null, false), diff --git a/controllers/admin/AdminProfilesController.php b/controllers/admin/AdminProfilesController.php index 56d9f04d3..57bdca16d 100644 --- a/controllers/admin/AdminProfilesController.php +++ b/controllers/admin/AdminProfilesController.php @@ -114,7 +114,7 @@ class AdminProfilesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_profile'] = array( 'href' => self::$currentIndex.'&addprofile&token='.$this->token, 'desc' => $this->l('Add new profile', null, null, false), diff --git a/controllers/admin/AdminQuickAccessesController.php b/controllers/admin/AdminQuickAccessesController.php index 1f4b5bab9..ecd8d5d0d 100644 --- a/controllers/admin/AdminQuickAccessesController.php +++ b/controllers/admin/AdminQuickAccessesController.php @@ -135,7 +135,7 @@ class AdminQuickAccessesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_quick_access'] = array( 'href' => self::$currentIndex.'&addquick_access&token='.$this->token, 'desc' => $this->l('Add new quick access', null, null, false), diff --git a/controllers/admin/AdminReferrersController.php b/controllers/admin/AdminReferrersController.php index bed1574e2..17e143c25 100644 --- a/controllers/admin/AdminReferrersController.php +++ b/controllers/admin/AdminReferrersController.php @@ -168,7 +168,7 @@ class AdminReferrersControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_referrer'] = array( 'href' => self::$currentIndex.'&addreferrer&token='.$this->token, 'desc' => $this->l('Add new referrer', null, null, false), diff --git a/controllers/admin/AdminRequestSqlController.php b/controllers/admin/AdminRequestSqlController.php index 068face35..a36151e9e 100644 --- a/controllers/admin/AdminRequestSqlController.php +++ b/controllers/admin/AdminRequestSqlController.php @@ -310,7 +310,7 @@ class AdminRequestSqlControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_request'] = array( 'href' => self::$currentIndex.'&addrequest_sql&token='.$this->token, 'desc' => $this->l('Add new SQL query', null, null, false), diff --git a/controllers/admin/AdminScenesController.php b/controllers/admin/AdminScenesController.php index ccd3f2793..eed625718 100644 --- a/controllers/admin/AdminScenesController.php +++ b/controllers/admin/AdminScenesController.php @@ -120,7 +120,7 @@ class AdminScenesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_scene'] = array( 'href' => self::$currentIndex.'&addscene&token='.$this->token, 'desc' => $this->l('Add new image map', null, null, false), diff --git a/controllers/admin/AdminSearchConfController.php b/controllers/admin/AdminSearchConfController.php index 91efb9430..aafb69f1b 100644 --- a/controllers/admin/AdminSearchConfController.php +++ b/controllers/admin/AdminSearchConfController.php @@ -242,7 +242,7 @@ class AdminSearchConfControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_alias'] = array( 'href' => self::$currentIndex.'&addalias&token='.$this->token, 'desc' => $this->l('Add new alias', null, null, false), diff --git a/controllers/admin/AdminSearchEnginesController.php b/controllers/admin/AdminSearchEnginesController.php index 92d4c1929..266eb1756 100644 --- a/controllers/admin/AdminSearchEnginesController.php +++ b/controllers/admin/AdminSearchEnginesController.php @@ -92,7 +92,7 @@ class AdminSearchEnginesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_search_engine'] = array( 'href' => self::$currentIndex.'&addsearch_engine&token='.$this->token, 'desc' => $this->l('Add new search engine', null, null, false), diff --git a/controllers/admin/AdminSpecificPriceRuleController.php b/controllers/admin/AdminSpecificPriceRuleController.php index 783aced1d..e6e2de668 100644 --- a/controllers/admin/AdminSpecificPriceRuleController.php +++ b/controllers/admin/AdminSpecificPriceRuleController.php @@ -130,7 +130,7 @@ class AdminSpecificPriceRuleControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_specific_price_rule'] = array( 'href' => self::$currentIndex.'&addspecific_price_rule&token='.$this->token, 'desc' => $this->l('Add new catalog price rule', null, null, false), diff --git a/controllers/admin/AdminStatesController.php b/controllers/admin/AdminStatesController.php index 6c549289f..b4a3fb717 100644 --- a/controllers/admin/AdminStatesController.php +++ b/controllers/admin/AdminStatesController.php @@ -114,7 +114,7 @@ class AdminStatesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_state'] = array( 'href' => self::$currentIndex.'&addstate&token='.$this->token, 'desc' => $this->l('Add new state', null, null, false), diff --git a/controllers/admin/AdminStatusesController.php b/controllers/admin/AdminStatusesController.php index aadb4ee44..ab0e269a9 100644 --- a/controllers/admin/AdminStatusesController.php +++ b/controllers/admin/AdminStatusesController.php @@ -242,7 +242,7 @@ class AdminStatusesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_order_state'] = array( 'href' => self::$currentIndex.'&addorder_state&token='.$this->token, 'desc' => $this->l('Add new order status', null, null, false), diff --git a/controllers/admin/AdminStoresController.php b/controllers/admin/AdminStoresController.php index 6e56fee02..8f73711ed 100644 --- a/controllers/admin/AdminStoresController.php +++ b/controllers/admin/AdminStoresController.php @@ -139,7 +139,7 @@ class AdminStoresControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_store'] = array( 'href' => self::$currentIndex.'&addstore&token='.$this->token, 'desc' => $this->l('Add new store', null, null, false), diff --git a/controllers/admin/AdminSuppliersController.php b/controllers/admin/AdminSuppliersController.php index 12d994703..15408bdf9 100644 --- a/controllers/admin/AdminSuppliersController.php +++ b/controllers/admin/AdminSuppliersController.php @@ -78,7 +78,7 @@ class AdminSuppliersControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_supplier'] = array( 'href' => self::$currentIndex.'&addsupplier&token='.$this->token, 'desc' => $this->l('Add new supplier', null, null, false), diff --git a/controllers/admin/AdminSupplyOrdersController.php b/controllers/admin/AdminSupplyOrdersController.php index 485bf6d90..dc8ae73bb 100644 --- a/controllers/admin/AdminSupplyOrdersController.php +++ b/controllers/admin/AdminSupplyOrdersController.php @@ -161,7 +161,7 @@ class AdminSupplyOrdersControllerCore extends AdminController 'desc' => $this->l('Back to list', null, null, false), 'icon' => 'process-icon-back' ); - } elseif (empty($this->display)) { + } elseif ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_supply_order'] = array( 'href' => self::$currentIndex.'&addsupply_order&token='.$this->token, 'desc' => $this->l('Add new supply order', null, null, false), diff --git a/controllers/admin/AdminTabsController.php b/controllers/admin/AdminTabsController.php index d2449776f..42ada96c3 100644 --- a/controllers/admin/AdminTabsController.php +++ b/controllers/admin/AdminTabsController.php @@ -96,7 +96,7 @@ class AdminTabsControllerCore extends AdminController 'desc' => $this->l('Back to list', null, null, false), 'icon' => 'process-icon-back' ); - } elseif (empty($this->display)) { + } elseif ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_menu'] = array( 'href' => self::$currentIndex.'&addtab&token='.$this->token, 'desc' => $this->l('Add new menu', null, null, false), diff --git a/controllers/admin/AdminTagsController.php b/controllers/admin/AdminTagsController.php index 5322e6ea6..bf8c850c6 100644 --- a/controllers/admin/AdminTagsController.php +++ b/controllers/admin/AdminTagsController.php @@ -71,7 +71,7 @@ class AdminTagsControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_tag'] = array( 'href' => self::$currentIndex.'&addtag&token='.$this->token, 'desc' => $this->l('Add new tag', null, null, false), diff --git a/controllers/admin/AdminTaxRulesGroupController.php b/controllers/admin/AdminTaxRulesGroupController.php index ba62da512..878b1c4e7 100644 --- a/controllers/admin/AdminTaxRulesGroupController.php +++ b/controllers/admin/AdminTaxRulesGroupController.php @@ -77,7 +77,7 @@ class AdminTaxRulesGroupControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_tax_rules_group'] = array( 'href' => self::$currentIndex.'&addtax_rules_group&token='.$this->token, 'desc' => $this->l('Add new tax rules group', null, null, false), diff --git a/controllers/admin/AdminTaxesController.php b/controllers/admin/AdminTaxesController.php index 8a1640a19..38c8da23e 100644 --- a/controllers/admin/AdminTaxesController.php +++ b/controllers/admin/AdminTaxesController.php @@ -117,7 +117,7 @@ class AdminTaxesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_tax'] = array( 'href' => self::$currentIndex.'&addtax&token='.$this->token, 'desc' => $this->l('Add new tax', null, null, false), diff --git a/controllers/admin/AdminThemesController.php b/controllers/admin/AdminThemesController.php index 09470ad22..61105c518 100644 --- a/controllers/admin/AdminThemesController.php +++ b/controllers/admin/AdminThemesController.php @@ -734,7 +734,7 @@ class AdminThemesControllerCore extends AdminController { parent::initPageHeaderToolbar(); - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['import_theme'] = array( 'href' => self::$currentIndex.'&action=importtheme&token='.$this->token, 'desc' => $this->l('Add new theme', null, null, false), diff --git a/controllers/admin/AdminWarehousesController.php b/controllers/admin/AdminWarehousesController.php index 0ae0e5ae8..4011597eb 100644 --- a/controllers/admin/AdminWarehousesController.php +++ b/controllers/admin/AdminWarehousesController.php @@ -85,7 +85,7 @@ class AdminWarehousesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_warehouse'] = array( 'href' => self::$currentIndex.'&addwarehouse&token='.$this->token, 'desc' => $this->l('Add new warehouse', null, null, false), diff --git a/controllers/admin/AdminWebserviceController.php b/controllers/admin/AdminWebserviceController.php index f44c412cb..f7ca60f65 100644 --- a/controllers/admin/AdminWebserviceController.php +++ b/controllers/admin/AdminWebserviceController.php @@ -102,7 +102,7 @@ class AdminWebserviceControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_webservice'] = array( 'href' => self::$currentIndex.'&addwebservice_account&token='.$this->token, 'desc' => $this->l('Add new webservice key', null, null, false), diff --git a/controllers/admin/AdminZonesController.php b/controllers/admin/AdminZonesController.php index 925e92170..b215ee276 100644 --- a/controllers/admin/AdminZonesController.php +++ b/controllers/admin/AdminZonesController.php @@ -69,7 +69,7 @@ class AdminZonesControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new_zone'] = array( 'href' => self::$currentIndex.'&addzone&token='.$this->token, 'desc' => $this->l('Add new zone', null, null, false), diff --git a/modules/hotelreservationsystem/controllers/admin/AdminRoomTypeGlobalDemand.php b/modules/hotelreservationsystem/controllers/admin/AdminRoomTypeGlobalDemand.php index 72e2f61e9..2e4611bbc 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminRoomTypeGlobalDemand.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminRoomTypeGlobalDemand.php @@ -130,7 +130,7 @@ class AdminRoomTypeGlobalDemandController extends ModuleAdminController public function initToolbar() { parent::initToolbar(); - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new'] = array( 'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token, 'desc' => $this->l('Add New Facility'), diff --git a/modules/qlohotelreview/controllers/admin/AdminHotelReviewCategory.php b/modules/qlohotelreview/controllers/admin/AdminHotelReviewCategory.php index 8c20dd222..7b116c5fc 100644 --- a/modules/qlohotelreview/controllers/admin/AdminHotelReviewCategory.php +++ b/modules/qlohotelreview/controllers/admin/AdminHotelReviewCategory.php @@ -80,7 +80,7 @@ class AdminHotelReviewCategoryController extends ModuleAdminController public function initToolbar() { parent::initToolbar(); - if (empty($this->display)) { + if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') { $this->page_header_toolbar_btn['new'] = array( 'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token, 'desc' => $this->l('Add new category')