Skip to content

Commit 7105a04

Browse files
author
Dominik
committed
added missing array-key
1 parent a641dd6 commit 7105a04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interface/lib/classes/quota_lib.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function get_trafficquota_data($clientid = null, $lastdays = 0) {
122122
// This Month
123123
$tmp_recs = $app->db->queryAllRecords("SELECT hostname, SUM(traffic_bytes) as t FROM web_traffic WHERE YEAR(traffic_date) = ? AND MONTH(traffic_date) = ? AND hostname IN ('".join("','",$hostnames)."') GROUP BY hostname", $tmp_year, $tmp_month);
124124
foreach ($tmp_recs as $tmp_rec) {
125-
$traffic_data[]['this_month'] = $tmp_rec['t'];
125+
$traffic_data[$tmp_rec['hostname']]['this_month'] = $tmp_rec['t'];
126126
}
127127
// This Year
128128
$tmp_recs = $app->db->queryAllRecords("SELECT hostname, SUM(traffic_bytes) as t FROM web_traffic WHERE YEAR(traffic_date) = ? AND hostname IN ('".join("','",$hostnames)."') GROUP BY hostname", $tmp_year);

0 commit comments

Comments
 (0)