diff options
author | Simon Rettberg | 2019-02-20 21:40:06 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-20 21:40:06 +0100 |
commit | 2fbad4f3da334e5719c6bf0531fe7442835dc5c9 (patch) | |
tree | 5f1d9829ed4b17c2fca3572653300b6d557e0e41 /modules-available/locationinfo/inc/coursebackend/coursebackend_exchange.inc.php | |
parent | [statistics] Fix RAM change warning to handle increase too (diff) | |
download | slx-admin-2fbad4f3da334e5719c6bf0531fe7442835dc5c9.tar.gz slx-admin-2fbad4f3da334e5719c6bf0531fe7442835dc5c9.tar.xz slx-admin-2fbad4f3da334e5719c6bf0531fe7442835dc5c9.zip |
[locationinfo] Stoffelsteffen!
- Enable caching for Exchange backend
- Update curl option setting
- Proper timestamp formatting
Diffstat (limited to 'modules-available/locationinfo/inc/coursebackend/coursebackend_exchange.inc.php')
-rwxr-xr-x | modules-available/locationinfo/inc/coursebackend/coursebackend_exchange.inc.php | 12 |
1 files changed, 6 insertions, 6 deletions
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; |