Hide customer menu items based on new settings

This commit is contained in:
Michael Wyraz
2016-07-22 09:31:20 +02:00
parent 084e72968a
commit d31c4fa37c

View File

@@ -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',