Commit e0467ced authored by Marius Burkard's avatar Marius Burkard
Browse files

Merge branch '6320-fix-email-backup-stats' into 'develop'

Changed 'Client Limit'-check and fixed styling

Closes #6320

See merge request !1593
parents 6095f997 89a12aea
Pipeline #10939 passed with stage
in 12 seconds
......@@ -13,56 +13,49 @@ $module['order'] = '40';
//**** Email accounts menu
$items = array();
if($app->auth->get_client_limit($userid, 'maildomain') != 0)
{
if($app->auth->get_client_limit($userid, 'maildomain') != 0) {
$items[] = array( 'title' => 'Domain',
'target' => 'content',
'link' => 'mail/mail_domain_list.php',
'html_id' => 'mail_domain_list');
}
if($app->auth->get_client_limit($userid, 'mailaliasdomain') != 0)
{
if($app->auth->get_client_limit($userid, 'mailaliasdomain') != 0) {
$items[] = array( 'title' => 'Domain Alias',
'target' => 'content',
'link' => 'mail/mail_aliasdomain_list.php',
'html_id' => 'mail_aliasdomain_list');
}
if($app->auth->get_client_limit($userid, 'mailbox') != 0)
{
if($app->auth->get_client_limit($userid, 'mailbox') != 0) {
$items[] = array( 'title' => 'Email Mailbox',
'target' => 'content',
'link' => 'mail/mail_user_list.php',
'html_id' => 'mail_user_list');
}
if($app->auth->get_client_limit($userid, 'mailalias') != 0)
{
if($app->auth->get_client_limit($userid, 'mailalias') != 0) {
$items[] = array( 'title' => 'Email Alias',
'target' => 'content',
'link' => 'mail/mail_alias_list.php',
'html_id' => 'mail_alias_list');
}
if($app->auth->get_client_limit($userid, 'mailforward') != 0)
{
if($app->auth->get_client_limit($userid, 'mailforward') != 0) {
$items[] = array( 'title' => 'Email Forward',
'target' => 'content',
'link' => 'mail/mail_forward_list.php',
'html_id' => 'mail_forward_list');
}
if($app->auth->get_client_limit($userid, 'mailcatchall') != 0)
{
if($app->auth->get_client_limit($userid, 'mailcatchall') != 0) {
$items[] = array( 'title' => 'Email Catchall',
'target' => 'content',
'link' => 'mail/mail_domain_catchall_list.php',
'html_id' => 'mail_domain_catchall_list');
}
if(! $app->auth->is_admin() && $app->auth->get_client_limit($userid, 'mail_wblist') != 0)
{
if(! $app->auth->is_admin() && $app->auth->get_client_limit($userid, 'mail_wblist') != 0) {
$items[] = array( 'title' => 'Email Whitelist',
'target' => 'content',
'link' => 'mail/mail_whitelist_list.php',
......@@ -74,8 +67,7 @@ if(! $app->auth->is_admin() && $app->auth->get_client_limit($userid, 'mail_wblis
'link' => 'mail/mail_blacklist_list.php',
'html_id' => 'mail_blacklist_list');
if($app->auth->get_client_limit($userid, 'mailrouting') != 0)
{
if($app->auth->get_client_limit($userid, 'mailrouting') != 0) {
$items[] = array( 'title' => 'Email Routing',
'target' => 'content',
'link' => 'mail/mail_transport_list.php',
......@@ -84,8 +76,7 @@ if($app->auth->get_client_limit($userid, 'mailrouting') != 0)
}
if(count($items) && $app->system->has_service($userid, 'mail'))
{
if(count($items) && $app->system->has_service($userid, 'mail')) {
$module['nav'][] = array( 'title' => 'Email Accounts',
'open' => 1,
'items' => $items);
......@@ -94,16 +85,14 @@ if(count($items) && $app->system->has_service($userid, 'mail'))
//**** Mailinglist menu
$items = array();
if($app->auth->get_client_limit($userid, 'mailmailinglist') != 0)
{
if($app->auth->get_client_limit($userid, 'mailmailinglist') != 0) {
$items[] = array( 'title' => 'Mailing List',
'target' => 'content',
'link' => 'mail/mail_mailinglist_list.php',
'html_id' => 'mail_mailinglist_list');
}
if(count($items) && $app->system->has_service($userid, 'mail'))
{
if(count($items) && $app->system->has_service($userid, 'mail')) {
$module['nav'][] = array( 'title' => 'Mailing List',
'open' => 1,
'items' => $items);
......@@ -112,8 +101,7 @@ if(count($items) && $app->system->has_service($userid, 'mail'))
//**** Spamfilter menu
$items = array();
if($app->auth->get_client_limit($userid, 'spamfilter_wblist') != 0)
{
if($app->auth->get_client_limit($userid, 'spamfilter_wblist') != 0) {
$items[] = array( 'title' => 'Whitelist',
'target' => 'content',
'link' => 'mail/spamfilter_whitelist_list.php',
......@@ -125,8 +113,7 @@ if($app->auth->get_client_limit($userid, 'spamfilter_wblist') != 0)
'html_id' => 'spamfilter_blacklist_list');
}
if($app->auth->is_admin())
{
if($app->auth->is_admin()) {
$items[] = array( 'title' => 'User / Domain',
'target' => 'content',
'link' => 'mail/spamfilter_users_list.php',
......@@ -142,8 +129,7 @@ if($app->auth->is_admin())
// 'link' => 'mail/spamfilter_config_list.php');
}
if(count($items))
{
if(count($items)) {
$module['nav'][] = array( 'title' => 'Spamfilter',
'open' => 1,
'items' => $items);
......@@ -152,8 +138,7 @@ if(count($items))
//**** Fetchmail menu
$items = array();
if($app->auth->get_client_limit($userid, 'fetchmail') != 0)
{
if($app->auth->get_client_limit($userid, 'fetchmail') != 0) {
$items[] = array( 'title' => 'Fetchmail',
'target' => 'content',
'link' => 'mail/mail_get_list.php',
......@@ -168,24 +153,21 @@ if($app->auth->get_client_limit($userid, 'fetchmail') != 0)
if ($app->system->has_service($userid, 'xmpp')) {
$items = array();
if($app->auth->get_client_limit($userid, 'xmpp_domain') != 0)
{
if($app->auth->get_client_limit($userid, 'xmpp_domain') != 0) {
$items[] = array( 'title' => 'XMPP Domain',
'target' => 'content',
'link' => 'mail/xmpp_domain_list.php',
'html_id' => 'xmpp_domain_list');
}
if($app->auth->get_client_limit($userid, 'xmpp_user') != 0)
{
if($app->auth->get_client_limit($userid, 'xmpp_user') != 0) {
$items[] = array( 'title' => 'XMPP Account',
'target' => 'content',
'link' => 'mail/xmpp_user_list.php',
'html_id' => 'xmpp_user_list');
}
if(count($items))
{
if(count($items)) {
$module['nav'][] = array( 'title' => 'Jabber / XMPP',
'open' => 1,
'items' => $items);
......@@ -207,8 +189,7 @@ $items[] = array( 'title' => 'Mailbox traffic',
'link' => 'mail/mail_user_stats.php',
'html_id' => 'mail_user_stats');
if($app->auth->get_client_limit($userid, 'backup') == 'y')
{
if($app->auth->get_client_limit($userid, 'mail_backup') != 'n') {
$items[] = array (
'title' => 'Backup Stats',
'target' => 'content',
......@@ -223,8 +204,7 @@ $module['nav'][] = array( 'title' => 'Statistics',
//**** Global filters menu
$items = array();
if($app->auth->is_admin())
{
if($app->auth->is_admin()) {
$items[] = array( 'title' => 'Postfix Whitelist',
'target' => 'content',
'link' => 'mail/mail_whitelist_list.php',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment