diff options
author | Dirk Riestere | 2017-03-09 01:41:31 +0100 |
---|---|---|
committer | Dirk Riestere | 2017-03-09 01:41:31 +0100 |
commit | 9cabedcfc2c95beda6a7455042bfab5b93ba5c0a (patch) | |
tree | 8dafd15a54e8ed128206d39a0c8dbc30a7a88b5e /modules-available/locationinfo/inc/coursebackend.inc.php | |
parent | Locationinfo: Errors from the CourseBackend are now safes in the db and shown... (diff) | |
download | slx-admin-9cabedcfc2c95beda6a7455042bfab5b93ba5c0a.tar.gz slx-admin-9cabedcfc2c95beda6a7455042bfab5b93ba5c0a.tar.xz slx-admin-9cabedcfc2c95beda6a7455042bfab5b93ba5c0a.zip |
Fehler beim xml lesen behoben
Diffstat (limited to 'modules-available/locationinfo/inc/coursebackend.inc.php')
-rw-r--r-- | modules-available/locationinfo/inc/coursebackend.inc.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules-available/locationinfo/inc/coursebackend.inc.php b/modules-available/locationinfo/inc/coursebackend.inc.php index ea2dcd44..8fc1f4f5 100644 --- a/modules-available/locationinfo/inc/coursebackend.inc.php +++ b/modules-available/locationinfo/inc/coursebackend.inc.php @@ -164,8 +164,11 @@ abstract class CourseBackend if ($this->getCacheTime() > 0 && $this->getRefreshTime() > 0) { $dbquery4 = Database::simpleQuery("SELECT locationid ,serverroomid, lastcalendarupdate FROM location_info WHERE serverid= :id", array('id' => $this->serverID)); foreach ($dbquery4->fetchAll(PDO::FETCH_COLUMN) as $row) { - if (strtotime($row['lastcalendarupdate']) > strtotime("-" . $this->getRefreshTime() . "seconds") && strtotime($row['lastcalendarupdate']) > strtotime("-" . $this->getCacheTime() . "seconds")) { - $sRoomIDs[$row['locationid']] = $row['serverroomid']; + if(isset($row['lastcalendarupdate'])) { + $lastUpdate = $row['lastcalendarupdate']; + if (strtotime($lastUpdate) > strtotime("-" . $this->getRefreshTime() . "seconds") && strtotime($lastUpdate) > strtotime("-" . $this->getCacheTime() . "seconds")) { + $sRoomIDs[$row['locationid']] = $row['serverroomid']; + } } } } |