summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/inc/coursebackend.inc.php
diff options
context:
space:
mode:
authorDirk Riestere2017-03-08 18:23:58 +0100
committerDirk Riestere2017-03-08 18:23:58 +0100
commite4f91cedd4a29139d10edc1cbdedcadd83de3ce8 (patch)
tree4c9533824f673cd943d0a40701dffc0ce4506423 /modules-available/locationinfo/inc/coursebackend.inc.php
parentAPI: setCredentials without json_encode (diff)
downloadslx-admin-e4f91cedd4a29139d10edc1cbdedcadd83de3ce8.tar.gz
slx-admin-e4f91cedd4a29139d10edc1cbdedcadd83de3ce8.tar.xz
slx-admin-e4f91cedd4a29139d10edc1cbdedcadd83de3ce8.zip
setCredentials wie im Treffen besprochen geändert und fetchshedule gibt jetzt nur noch arrays zurück
Diffstat (limited to 'modules-available/locationinfo/inc/coursebackend.inc.php')
-rw-r--r--modules-available/locationinfo/inc/coursebackend.inc.php5
1 files changed, 3 insertions, 2 deletions
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));
}