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 ( 'email' => array (
'url' => 'customer_email.php', 'url' => 'customer_email.php',
'label' => $lng['menue']['email']['email'], 'label' => $lng['menue']['email']['email'],
'show_element' => ( !in_array('email',explode(',',Settings::Get('panel.customer_hide_options'))) ),
'elements' => array ( 'elements' => array (
array ( array (
'url' => 'customer_email.php?page=emails', 'url' => 'customer_email.php?page=emails',
'label' => $lng['menue']['email']['emails'], 'label' => $lng['menue']['email']['emails'],
'required_resources' => 'emails', 'required_resources' => 'emails'
), ),
array ( array (
'url' => 'customer_email.php?page=emails&action=add', 'url' => 'customer_email.php?page=emails&action=add',
@@ -71,6 +72,7 @@ return array (
'mysql' => array ( 'mysql' => array (
'url' => 'customer_mysql.php', 'url' => 'customer_mysql.php',
'label' => $lng['menue']['mysql']['mysql'], 'label' => $lng['menue']['mysql']['mysql'],
'show_element' => ( !in_array('mysql',explode(',',Settings::Get('panel.customer_hide_options'))) ),
'elements' => array ( 'elements' => array (
array ( array (
'url' => 'customer_mysql.php?page=mysqls', 'url' => 'customer_mysql.php?page=mysqls',
@@ -89,6 +91,7 @@ return array (
'domains' => array ( 'domains' => array (
'url' => 'customer_domains.php', 'url' => 'customer_domains.php',
'label' => $lng['menue']['domains']['domains'], 'label' => $lng['menue']['domains']['domains'],
'show_element' => ( !in_array('domains',explode(',',Settings::Get('panel.customer_hide_options'))) ),
'elements' => array ( 'elements' => array (
array ( array (
'url' => 'customer_domains.php?page=domains', 'url' => 'customer_domains.php?page=domains',
@@ -99,6 +102,7 @@ return array (
'ftp' => array ( 'ftp' => array (
'url' => 'customer_ftp.php', 'url' => 'customer_ftp.php',
'label' => $lng['menue']['ftp']['ftp'], 'label' => $lng['menue']['ftp']['ftp'],
'show_element' => ( !in_array('ftp',explode(',',Settings::Get('panel.customer_hide_options'))) ),
'elements' => array ( 'elements' => array (
array ( array (
'url' => 'customer_ftp.php?page=accounts', 'url' => 'customer_ftp.php?page=accounts',
@@ -115,19 +119,22 @@ return array (
'extras' => array ( 'extras' => array (
'url' => 'customer_extras.php', 'url' => 'customer_extras.php',
'label' => $lng['menue']['extras']['extras'], 'label' => $lng['menue']['extras']['extras'],
'show_element' => ( !in_array('extras',explode(',',Settings::Get('panel.customer_hide_options'))) ),
'elements' => array ( 'elements' => array (
array ( array (
'url' => 'customer_extras.php?page=htpasswds', 'url' => 'customer_extras.php?page=htpasswds',
'label' => $lng['menue']['extras']['directoryprotection'], 'label' => $lng['menue']['extras']['directoryprotection'],
'show_element' => ( !in_array('extras.directoryprotection',explode(',',Settings::Get('panel.customer_hide_options'))) ),
), ),
array ( array (
'url' => 'customer_extras.php?page=htaccess', 'url' => 'customer_extras.php?page=htaccess',
'label' => $lng['menue']['extras']['pathoptions'], 'label' => $lng['menue']['extras']['pathoptions'],
'show_element' => ( !in_array('extras.pathoptions',explode(',',Settings::Get('panel.customer_hide_options'))) ),
), ),
array ( array (
'url' => 'customer_logger.php?page=log', 'url' => 'customer_logger.php?page=log',
'label' => $lng['menue']['logger']['logger'], '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 ( array (
'url' => 'customer_extras.php?page=backup', 'url' => 'customer_extras.php?page=backup',
@@ -139,6 +146,7 @@ return array (
'traffic' => array ( 'traffic' => array (
'url' => 'customer_traffic.php', 'url' => 'customer_traffic.php',
'label' => $lng['menue']['traffic']['traffic'], 'label' => $lng['menue']['traffic']['traffic'],
'show_element' => ( !in_array('traffic',explode(',',Settings::Get('panel.customer_hide_options'))) ),
'elements' => array ( 'elements' => array (
array ( array (
'url' => 'customer_traffic.php?page=current', 'url' => 'customer_traffic.php?page=current',