diff --git a/interface/web/dashboard/dashlets/databasequota.php b/interface/web/dashboard/dashlets/databasequota.php index ca8a70dd31e013f73bd3fe8fb34e35862d98bc91..641dfd7784e0813f8abaa109c42d261a424ada12 100644 --- a/interface/web/dashboard/dashlets/databasequota.php +++ b/interface/web/dashboard/dashlets/databasequota.php @@ -2,7 +2,7 @@ class dashlet_databasequota { - function show($limit_to_client_id = 0) { + function show($limit_to_client_id = null) { global $app; //* Loading Template @@ -23,7 +23,7 @@ class dashlet_databasequota { $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dashlet_databasequota.lng'; if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - if ($limit_to_client_id == 0 || $_SESSION["s"]["user"]["typ"] != 'admin') { + if ($_SESSION["s"]["user"]["typ"] != 'admin') { $client_id = $_SESSION['s']['user']['client_id']; } else { $client_id = $limit_to_client_id; diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index d68015dd11ec9a6028f91e1af092d4baf30d019b..79ac2126c831d93cfbaf2fd11edae1cb5f0d974f 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -149,8 +149,10 @@ class dashlet_limits if ($limit_to_client_id == 0) { $client_id = $_SESSION['s']['user']['client_id']; + $user_is_admin = true; } else { $client_id = $limit_to_client_id; + $user_is_admin = false; } $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); @@ -161,6 +163,12 @@ class dashlet_limits foreach ($limits as $limit) { $field = $limit['field']; $value = $client[$field]; + if ($user_is_admin) { + $value = $wb['unlimited_txt']; + } else { + $value = $client[$field]; + } + if ($value != 0 || $value == $wb['unlimited_txt']) { $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value; if (isset($limit['q_type']) && $limit['q_type'] != '') { diff --git a/interface/web/dashboard/dashlets/mailquota.php b/interface/web/dashboard/dashlets/mailquota.php index 784e6b1c8782f5a96e061b5fc79efaaded056d4f..b310cc1dcbfadb2db7729dc11660f931cd2e6587 100644 --- a/interface/web/dashboard/dashlets/mailquota.php +++ b/interface/web/dashboard/dashlets/mailquota.php @@ -2,7 +2,7 @@ class dashlet_mailquota { - function show($limit_to_client_id = 0) { + function show($limit_to_client_id = null) { global $app; //* Loading Template @@ -16,7 +16,7 @@ class dashlet_mailquota { if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - if ($limit_to_client_id == 0 || $_SESSION["s"]["user"]["typ"] != 'admin') { + if ($_SESSION["s"]["user"]["typ"] != 'admin') { $client_id = $_SESSION['s']['user']['client_id']; } else { $client_id = $limit_to_client_id; diff --git a/interface/web/dashboard/dashlets/quota.php b/interface/web/dashboard/dashlets/quota.php index 6380e18d8725865acb9b576ca34e78f85c2c04b3..3225bd304fff4b37bd3376a9bbd299c472005771 100644 --- a/interface/web/dashboard/dashlets/quota.php +++ b/interface/web/dashboard/dashlets/quota.php @@ -2,7 +2,7 @@ class dashlet_quota { - function show($limit_to_client_id = 0) { + function show($limit_to_client_id = null) { global $app; //* Loading Template @@ -24,7 +24,7 @@ class dashlet_quota { if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - if ($limit_to_client_id == 0 || $_SESSION["s"]["user"]["typ"] != 'admin') { + if ($_SESSION["s"]["user"]["typ"] != 'admin') { $client_id = $_SESSION['s']['user']['client_id']; } else { $client_id = $limit_to_client_id;