From acd9e01cd9b598185fc8ddfcf53e5e5a93044154 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Mon, 08 Oct 2012 09:25:16 -0400 Subject: [PATCH] Fixed a problem in mail quota statistics which caould cause 0 values in multiserver setups. --- interface/web/mail/user_quota_stats.php | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/interface/web/mail/user_quota_stats.php b/interface/web/mail/user_quota_stats.php index a7a8056..9a0ee14 100644 --- a/interface/web/mail/user_quota_stats.php +++ b/interface/web/mail/user_quota_stats.php @@ -23,7 +23,13 @@ $monitor_data = array(); if(is_array($tmp_rec)) { foreach ($tmp_rec as $tmp_mon) { - $monitor_data = array_merge_recursive($monitor_data,unserialize($app->db->unquote($tmp_mon['data']))); + //$monitor_data = array_merge_recursive($monitor_data,unserialize($app->db->unquote($tmp_mon['data']))); + $tmp_array = unserialize($app->db->unquote($tmp_mon['data'])); + if(is_array($tmp_array)) { + foreach($tmp_array as $username => $data) { + $monitor_data[$username]['used'] += $data['used']; + } + } } } -- Gitblit v1.9.1