From e4f91cedd4a29139d10edc1cbdedcadd83de3ce8 Mon Sep 17 00:00:00 2001 From: Dirk Riestere Date: Wed, 8 Mar 2017 18:23:58 +0100 Subject: setCredentials wie im Treffen besprochen geändert und fetchshedule gibt jetzt nur noch arrays zurück --- modules-available/locationinfo/inc/coursebackend.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules-available/locationinfo/inc/coursebackend.inc.php') diff --git a/modules-available/locationinfo/inc/coursebackend.inc.php b/modules-available/locationinfo/inc/coursebackend.inc.php index ab787738..ea2dcd44 100644 --- a/modules-available/locationinfo/inc/coursebackend.inc.php +++ b/modules-available/locationinfo/inc/coursebackend.inc.php @@ -106,12 +106,12 @@ abstract class CourseBackend * uses json to setCredentials, the json must follow the form given in * getCredentials * - * @param string $json jsonarray with the credentials + * @param string $data array with the credentials * @param string $url address of the server * @param int $serverID ID of the server * @returns void */ - public abstract function setCredentials($json, $url, $serverID); + public abstract function setCredentials($data, $url, $serverID); /** * @return int desired caching time of results, in seconds. 0 = no caching @@ -180,6 +180,7 @@ abstract class CourseBackend if ($this->getCacheTime() > 0) { foreach ($newResult as $key => $value) { + $value = json_encode($value); $now = strtotime('Now'); Database::simpleQuery("UPDATE location_info SET calendar = :ttable, lastcalendarupdate = :now WHERE locationid = :id ", array('id' => $key, 'ttable' => $value, 'now' => $now)); } -- cgit v1.2.3-55-g7522