From 489c5ad82573bcf85732c09e746a44129a3e6638 Mon Sep 17 00:00:00 2001 From: Dirk Riestere Date: Tue, 14 Mar 2017 15:13:08 +0100 Subject: Codeormat verschönert für HisInOne und ein json_encode für das backend eingefügt der vergessen wurde --- modules-available/locationinfo/inc/coursebackend.inc.php | 6 +++--- .../locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'modules-available/locationinfo/inc') diff --git a/modules-available/locationinfo/inc/coursebackend.inc.php b/modules-available/locationinfo/inc/coursebackend.inc.php index 8fc1f4f5..45263601 100644 --- a/modules-available/locationinfo/inc/coursebackend.inc.php +++ b/modules-available/locationinfo/inc/coursebackend.inc.php @@ -149,14 +149,14 @@ abstract class CourseBackend $result = []; $sRoomIDs = []; foreach ($dbquery1->fetchAll(PDO::FETCH_ASSOC) as $row) { - $sroomID = $row['serverroomid']; + $sRoomID = $row['serverroomid']; $lastUpdate = $row['lastcalendarupdate']; $calendar = $row['calendar']; //Check if in cache if lastUpdate is null then it is interpreted as 1970 if (strtotime($lastUpdate) > strtotime("-" . $this->getCacheTime() . "seconds") && $this->getCacheTime() > 0) { - $result[$row['locationid']] = $calendar; + $result[$row['locationid']] = json_decode($calendar); } else { - $sRoomIDs[$row['locationid']] = $sroomID; + $sRoomIDs[$row['locationid']] = $sRoomID; } } diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php index 0d057bee..dc47c0f5 100644 --- a/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php +++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php @@ -366,7 +366,7 @@ class CourseBackend_HisInOne extends CourseBackend private function getCurrentWeekDates() { $DateArray = array(); - $startdate = strtotime('Now'); + $startdate = strtotime('-2month'); for ($i = 0; $i <= 7; $i++) { $DateArray[] = date('Y-m-d', strtotime("+ {$i} day", $startdate)); } -- cgit v1.2.3-55-g7522