diff options
-rw-r--r-- | modules-available/locationinfo/inc/coursebackend.inc.php | 6 | ||||
-rw-r--r-- | modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php | 2 |
2 files changed, 4 insertions, 4 deletions
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)); } |