From b5b20494741a721eae44c1afea8369437d8ce97e Mon Sep 17 00:00:00 2001 From: Christian Hofmaier Date: Tue, 20 Dec 2016 16:09:55 +0100 Subject: [statistics_reporting] deleted vm per user (for udo) after adding it last commit --- modules-available/statistics_reporting/inc/statisticreporting.inc.php | 4 ++-- modules-available/statistics_reporting/page.inc.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules-available/statistics_reporting') diff --git a/modules-available/statistics_reporting/inc/statisticreporting.inc.php b/modules-available/statistics_reporting/inc/statisticreporting.inc.php index 0e6039bb..c9fe1c64 100644 --- a/modules-available/statistics_reporting/inc/statisticreporting.inc.php +++ b/modules-available/statistics_reporting/inc/statisticreporting.inc.php @@ -46,11 +46,11 @@ class StatisticReporting // logins between bounds public static function getUserStatistics($cutOffTimeInSeconds, $lowerTimeBound = 0, $upperTimeBound = 24) { $queryTime = time() - $cutOffTimeInSeconds; - $res = Database::simpleQuery("SELECT username, data, COUNT(*) AS 'count' + $res = Database::simpleQuery("SELECT username, COUNT(*) AS 'count' FROM statistic WHERE typeid='.vmchooser-session-name' AND dateline>=$queryTime AND ((FROM_UNIXTIME(dateline+data, '%H')*1 >= $lowerTimeBound) AND (FROM_UNIXTIME(dateline, '%H')*1 < $upperTimeBound)) - GROUP BY username, data ORDER BY 3 DESC"); + GROUP BY username ORDER BY 2 DESC"); return $res; } diff --git a/modules-available/statistics_reporting/page.inc.php b/modules-available/statistics_reporting/page.inc.php index 6392dd19..9417d2da 100644 --- a/modules-available/statistics_reporting/page.inc.php +++ b/modules-available/statistics_reporting/page.inc.php @@ -63,7 +63,7 @@ class Page_Statistics_Reporting extends Page $res = StatisticReporting::getUserStatistics($cutOffTimer, $lowerTimeBound, $upperTimeBound); $data[] = array('perUser' => array()); while ($row = $res->fetch(PDO::FETCH_NUM)) { - $data['perUser'][] = array('user' => $row[0], 'vm' => $row[1], 'loginCount' => $row[2]); + $data['perUser'][] = array('user' => $row[0], 'loginCount' => $row[1]); } // per vm -- cgit v1.2.3-55-g7522