From 2fbad4f3da334e5719c6bf0531fe7442835dc5c9 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 20 Feb 2019 21:40:06 +0100 Subject: [locationinfo] Stoffelsteffen! - Enable caching for Exchange backend - Update curl option setting - Proper timestamp formatting --- .../inc/coursebackend/coursebackend_exchange.inc.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules-available/locationinfo') diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_exchange.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_exchange.inc.php index a62ea6d5..1623755f 100755 --- a/modules-available/locationinfo/inc/coursebackend/coursebackend_exchange.inc.php +++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_exchange.inc.php @@ -135,7 +135,7 @@ class CourseBackend_Exchange extends CourseBackend */ public function getCacheTime() { - return 0; + return 15 * 60; } /** @@ -144,7 +144,7 @@ class CourseBackend_Exchange extends CourseBackend */ public function getRefreshTime() { - return 0; + return 30 * 60; } /** @@ -177,8 +177,8 @@ class CourseBackend_Exchange extends CourseBackend $schedules[$roomId][] = array( 'title' => $item->Subject, - 'start' => $start->format('Y-m-d') . "T" . $start->format('G:i:s'), - 'end' => $end->format('Y-m-d') . "T" . $end->format('G:i:s') + 'start' => $start->format('Y-m-d') . "T" . $start->format('H:i:s'), + 'end' => $end->format('Y-m-d') . "T" . $end->format('H:i:s') ); } } @@ -232,8 +232,8 @@ class CourseBackend_Exchange extends CourseBackend $client = new Client($this->serverAddress, $this->username, $this->password, $this->clientVersion); $client->setTimezone($this->timezone); $client->setCurlOptions(array( - CURLOPT_SSL_VERIFYPEER => $this->verifyHostname, - CURLOPT_SSL_VERIFYHOST => $this->verifyCert + CURLOPT_SSL_VERIFYPEER => $this->verifyHostname ? 2 : 0, + CURLOPT_SSL_VERIFYHOST => $this->verifyCert ? 1 : 0, )); return $client; -- cgit v1.2.3-55-g7522