From b2b6f357a9da36ee8b757726193987eb99cb03d9 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 25 Feb 2011 20:02:25 +0100 Subject: [PATCH] fixed bug for logging data --- lib/Controller/DataController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Controller/DataController.php b/lib/Controller/DataController.php index e786680..bd3af4d 100644 --- a/lib/Controller/DataController.php +++ b/lib/Controller/DataController.php @@ -53,18 +53,16 @@ class DataController extends Controller { $timestamp = $this->view->request->getParameter('ts'); $value = $this->view->request->getParameter('value'); - if (!$timestamp) { + if (!is_null($timestamp)) { $timestamp = round(microtime(TRUE) * 1000); } - if (!$value) { + if (!is_null($value)) { $value = 1; } $data = new Model\Data($channel, $timestamp, $value); - $channel->addData($data); - $this->em->flush(); }