summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/inc/coursebackend.inc.php
diff options
context:
space:
mode:
authorDirk Riestere2017-02-24 18:12:39 +0100
committerDirk Riestere2017-02-24 18:12:39 +0100
commit0c50b5e0a61ffe7b5d543d9cba94ea88ab009f04 (patch)
tree968d2da75e5ecd3e6f06ccf692f92d175b61f0d6 /modules-available/locationinfo/inc/coursebackend.inc.php
parentfrontend: bug fixes (diff)
downloadslx-admin-0c50b5e0a61ffe7b5d543d9cba94ea88ab009f04.tar.gz
slx-admin-0c50b5e0a61ffe7b5d543d9cba94ea88ab009f04.tar.xz
slx-admin-0c50b5e0a61ffe7b5d543d9cba94ea88ab009f04.zip
Bugfixes und Caching wie besprochen verändert
Diffstat (limited to 'modules-available/locationinfo/inc/coursebackend.inc.php')
-rw-r--r--modules-available/locationinfo/inc/coursebackend.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/locationinfo/inc/coursebackend.inc.php b/modules-available/locationinfo/inc/coursebackend.inc.php
index e21cbac3..47eb73f4 100644
--- a/modules-available/locationinfo/inc/coursebackend.inc.php
+++ b/modules-available/locationinfo/inc/coursebackend.inc.php
@@ -136,10 +136,10 @@ abstract class CourseBackend
}
//Check if we should refresh other rooms recently requested by front ends
- if ($this->getCacheTime()>0) {
+ if ($this->getCacheTime()>0&&$this->RefreshTime()>0) {
$dbquery4 = Database::simpleQuery("SELECT locationid ,serverroomid, lastcalenderupdate FROM location_info WHERE serverid= :id", array('id' => $this->serverID));
foreach($dbquery4->fetchAll(PDO::FETCH_COLUMN) as $row){
- if($row['lastcalenderupdate']<$this->getRefreshTime()){
+ if(strtotime($row['lastcalenderupdate'])>strtotime("-".$this->getRefreshTime()."seconds")&&strtotime($row['lastcalenderupdate'])> strtotime("-".$this->getCacheTime()."seconds")){
$sroomIDs[$row['locationid']] = $row['serverroomid'];
}
}