From 5d11e1209ea7876c391075817d64ddf1a5cdde4c Mon Sep 17 00:00:00 2001 From: mcramer Date: Fri, 24 Aug 2012 17:51:45 +0000 Subject: [PATCH] VHost Subdomains added to traffic stats Links removed from sum rows in stats --- .../sites/templates/web_sites_stats_list.htm | 20 +++++++++---------- interface/web/sites/web_sites_stats.php | 2 +- server/cron_daily.php | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/interface/web/sites/templates/web_sites_stats_list.htm b/interface/web/sites/templates/web_sites_stats_list.htm index 475c9d1b9..3e0642489 100644 --- a/interface/web/sites/templates/web_sites_stats_list.htm +++ b/interface/web/sites/templates/web_sites_stats_list.htm @@ -29,20 +29,20 @@ - {tmpl_var name="domain"} - {tmpl_var name="this_month"} MB - {tmpl_var name="last_month"} MB - {tmpl_var name="this_year"} MB - {tmpl_var name="last_year"} MB + {tmpl_var name="domain"} + {tmpl_var name="this_month"} MB + {tmpl_var name="last_month"} MB + {tmpl_var name="this_year"} MB + {tmpl_var name="last_year"} MB - {tmpl_var name="sum_txt"} - {tmpl_var name="sum_this_month"} MB - {tmpl_var name="sum_last_month"} MB - {tmpl_var name="sum_this_year"} MB - {tmpl_var name="sum_last_year"} MB + {tmpl_var name="sum_txt"} + {tmpl_var name="sum_this_month"} MB + {tmpl_var name="sum_last_month"} MB + {tmpl_var name="sum_this_year"} MB + {tmpl_var name="sum_last_year"} MB
diff --git a/interface/web/sites/web_sites_stats.php b/interface/web/sites/web_sites_stats.php index 98c4865fd..bd7acb642 100644 --- a/interface/web/sites/web_sites_stats.php +++ b/interface/web/sites/web_sites_stats.php @@ -82,7 +82,7 @@ class list_action extends listform_actions { } $list = new list_action; -$list->SQLExtWhere = "type = 'vhost'"; +$list->SQLExtWhere = "(type = 'vhost' or type = 'vhostsubdomain')"; $list->SQLOrderBy = 'ORDER BY domain'; $list->onLoad(); diff --git a/server/cron_daily.php b/server/cron_daily.php index cd86c1ca0..066fa4dc9 100644 --- a/server/cron_daily.php +++ b/server/cron_daily.php @@ -452,7 +452,7 @@ if ($app->dbmaster == $app->db) { $current_month = date('Y-m'); //* Check website traffic quota - $sql = "SELECT sys_groupid,domain_id,domain,traffic_quota,traffic_quota_lock FROM web_domain WHERE (traffic_quota > 0 or traffic_quota_lock = 'y') and type = 'vhost'"; + $sql = "SELECT sys_groupid,domain_id,domain,traffic_quota,traffic_quota_lock FROM web_domain WHERE (traffic_quota > 0 or traffic_quota_lock = 'y') and (type = 'vhost' OR type = 'vhostsubdomain')"; $records = $app->db->queryAllRecords($sql); if(is_array($records)) { foreach($records as $rec) { @@ -592,7 +592,7 @@ if($backup_dir != '') { chmod(escapeshellcmd($backup_dir), $backup_dir_permissions); } - $sql = "SELECT * FROM web_domain WHERE server_id = '".$conf['server_id']."' AND type = 'vhost' AND backup_interval != 'none'"; + $sql = "SELECT * FROM web_domain WHERE server_id = '".$conf['server_id']."' AND (type = 'vhost' OR type = 'vhostsubdomain') AND backup_interval != 'none'"; $records = $app->db->queryAllRecords($sql); if(is_array($records)) { foreach($records as $rec) { -- GitLab