From d31c4fa37c53dc0cc579f82504445b5c8199cc9f Mon Sep 17 00:00:00 2001 From: Michael Wyraz Date: Fri, 22 Jul 2016 09:31:20 +0200 Subject: [PATCH] Hide customer menu items based on new settings --- lib/navigation/00.froxlor.main.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/navigation/00.froxlor.main.php b/lib/navigation/00.froxlor.main.php index 2a989942..79447400 100644 --- a/lib/navigation/00.froxlor.main.php +++ b/lib/navigation/00.froxlor.main.php @@ -48,11 +48,12 @@ return array ( 'email' => array ( 'url' => 'customer_email.php', 'label' => $lng['menue']['email']['email'], + 'show_element' => ( !in_array('email',explode(',',Settings::Get('panel.customer_hide_options'))) ), 'elements' => array ( array ( 'url' => 'customer_email.php?page=emails', 'label' => $lng['menue']['email']['emails'], - 'required_resources' => 'emails', + 'required_resources' => 'emails' ), array ( 'url' => 'customer_email.php?page=emails&action=add', @@ -71,6 +72,7 @@ return array ( 'mysql' => array ( 'url' => 'customer_mysql.php', 'label' => $lng['menue']['mysql']['mysql'], + 'show_element' => ( !in_array('mysql',explode(',',Settings::Get('panel.customer_hide_options'))) ), 'elements' => array ( array ( 'url' => 'customer_mysql.php?page=mysqls', @@ -89,6 +91,7 @@ return array ( 'domains' => array ( 'url' => 'customer_domains.php', 'label' => $lng['menue']['domains']['domains'], + 'show_element' => ( !in_array('domains',explode(',',Settings::Get('panel.customer_hide_options'))) ), 'elements' => array ( array ( 'url' => 'customer_domains.php?page=domains', @@ -99,6 +102,7 @@ return array ( 'ftp' => array ( 'url' => 'customer_ftp.php', 'label' => $lng['menue']['ftp']['ftp'], + 'show_element' => ( !in_array('ftp',explode(',',Settings::Get('panel.customer_hide_options'))) ), 'elements' => array ( array ( 'url' => 'customer_ftp.php?page=accounts', @@ -115,19 +119,22 @@ return array ( 'extras' => array ( 'url' => 'customer_extras.php', 'label' => $lng['menue']['extras']['extras'], + 'show_element' => ( !in_array('extras',explode(',',Settings::Get('panel.customer_hide_options'))) ), 'elements' => array ( array ( 'url' => 'customer_extras.php?page=htpasswds', 'label' => $lng['menue']['extras']['directoryprotection'], + 'show_element' => ( !in_array('extras.directoryprotection',explode(',',Settings::Get('panel.customer_hide_options'))) ), ), array ( 'url' => 'customer_extras.php?page=htaccess', 'label' => $lng['menue']['extras']['pathoptions'], + 'show_element' => ( !in_array('extras.pathoptions',explode(',',Settings::Get('panel.customer_hide_options'))) ), ), array ( 'url' => 'customer_logger.php?page=log', 'label' => $lng['menue']['logger']['logger'], - 'show_element' => ( Settings::Get('logger.enabled') == true ) + 'show_element' => ( Settings::Get('logger.enabled') == true ) && ( !in_array('extras.logger',explode(',',Settings::Get('panel.customer_hide_options'))) ) ), array ( 'url' => 'customer_extras.php?page=backup', @@ -139,6 +146,7 @@ return array ( 'traffic' => array ( 'url' => 'customer_traffic.php', 'label' => $lng['menue']['traffic']['traffic'], + 'show_element' => ( !in_array('traffic',explode(',',Settings::Get('panel.customer_hide_options'))) ), 'elements' => array ( array ( 'url' => 'customer_traffic.php?page=current',