diff options
author | Udo Walter | 2017-01-13 13:22:27 +0100 |
---|---|---|
committer | Udo Walter | 2017-01-13 13:22:27 +0100 |
commit | 5da76e80a9fb64bfbda5897aa08fa1bc575dbd25 (patch) | |
tree | 8d115fd887ee8f6ab744302c1a5e040b0b89ad6e /modules-available/statistics_reporting/page.inc.php | |
parent | [statistics_reporting] moved some functions to a new class (diff) | |
download | slx-admin-5da76e80a9fb64bfbda5897aa08fa1bc575dbd25.tar.gz slx-admin-5da76e80a9fb64bfbda5897aa08fa1bc575dbd25.tar.xz slx-admin-5da76e80a9fb64bfbda5897aa08fa1bc575dbd25.zip |
[statistics_reporting] improved cutoff in query functions + bugfix
Diffstat (limited to 'modules-available/statistics_reporting/page.inc.php')
-rw-r--r-- | modules-available/statistics_reporting/page.inc.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules-available/statistics_reporting/page.inc.php b/modules-available/statistics_reporting/page.inc.php index 82c03acc..aa373f54 100644 --- a/modules-available/statistics_reporting/page.inc.php +++ b/modules-available/statistics_reporting/page.inc.php @@ -24,7 +24,10 @@ class Page_Statistics_Reporting extends Page { // timespan you want to see = Days selected * seconds per Day (86400) // default = 14 days - GetData::$cutOff = Request::get('cutoff', 14, 'int') - 1; + $date = new DateTime(date('Y-m-d 00:00:00')); + $date->sub(new DateInterval('P'.(Request::get('cutoff', 14, 'int') - 1).'D')); + GetData::$from = $date->getTimestamp(); + GetData::$to = time(); GetData::$lowerTimeBound = Request::get('lower', 0, 'int'); GetData::$upperTimeBound = Request::get('upper', 24, 'int'); |