From 14ed3b6fe22b735f43e036270598c9d24356dc95 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 1 Apr 2014 08:49:06 +0200 Subject: [PATCH] Fix that the timeline does not accept timestamps as start and end refs #4190 --- .../application/controllers/TimelineController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/controllers/TimelineController.php b/modules/monitoring/application/controllers/TimelineController.php index 3915a4ecd..e419b1c3d 100644 --- a/modules/monitoring/application/controllers/TimelineController.php +++ b/modules/monitoring/application/controllers/TimelineController.php @@ -210,14 +210,16 @@ class Monitoring_TimelineController extends ActionController private function buildTimeRanges() { $startTime = new DateTime(); - $startTimestamp = strtotime($this->_request->getParam('start')); + $startParam = $this->_request->getParam('start'); + $startTimestamp = is_numeric($startParam) ? intval($startParam) : strtotime($startParam); if ($startTimestamp !== false) { $startTime->setTimestamp($startTimestamp); } $this->extrapolateDateTime($startTime); $endTime = clone $startTime; - $endTimestamp = strtotime($this->_request->getParam('end')); + $endParam = $this->_request->getParam('end'); + $endTimestamp = is_numeric($endParam) ? intval($endParam) : strtotime($endParam); if ($endTimestamp !== false) { $endTime->setTimestamp($endTimestamp); } else {