Skip to content

Commit 9f3a179

Browse files
committed
Fixed: FS#1069 - Site traffic above 2Gbytes a month cannot be displayed.
1 parent ef37197 commit 9f3a179

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

interface/web/sites/web_sites_stats.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ function prepareDataRow($rec)
3434
$tmp_year = date('Y');
3535
$tmp_month = date('m');
3636
$tmp_rec = $app->db->queryOneRecord("SELECT SUM(traffic_bytes) as t FROM web_traffic WHERE hostname = '".$rec['domain']."' AND YEAR(traffic_date) = '$tmp_year' AND MONTH(traffic_date) = '$tmp_month'");
37-
$rec['this_month'] = number_format(intval($tmp_rec['t'])/1024, 0, '.', ' ');
37+
$rec['this_month'] = number_format($tmp_rec['t']/1024, 0, '.', ' ');
3838

3939
//** Traffic of the current year
4040
$tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = '".$rec['domain']."' AND YEAR(traffic_date) = '$tmp_year'");
41-
$rec['this_year'] = number_format(intval($tmp_rec['t'])/1024, 0, '.', ' ');
41+
$rec['this_year'] = number_format($tmp_rec['t']/1024, 0, '.', ' ');
4242

4343
//** Traffic of the last month
4444
$tmp_year = date('Y',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
4545
$tmp_month = date('m',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
4646
$tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = '".$rec['domain']."' AND YEAR(traffic_date) = '$tmp_year' AND MONTH(traffic_date) = '$tmp_month'");
47-
$rec['last_month'] = number_format(intval($tmp_rec['t'])/1024, 0, '.', ' ');
47+
$rec['last_month'] = number_format($tmp_rec['t']/1024, 0, '.', ' ');
4848

4949
//** Traffic of the last year
5050
$tmp_year = date('Y',mktime(0, 0, 0, date("m"), date("d"), date("Y")-1));
5151
$tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = '".$rec['domain']."' AND YEAR(traffic_date) = '$tmp_year'");
52-
$rec['last_year'] = number_format(intval($tmp_rec['t'])/1024, 0, '.', ' ');
52+
$rec['last_year'] = number_format($tmp_rec['t']/1024, 0, '.', ' ');
5353

5454
//* The variable "id" contains always the index variable
5555
$rec['id'] = $rec[$this->idx_key];

0 commit comments

Comments
 (0)