Browse Source

Minor - or -> ||

Yannick Warnier 7 years ago
parent
commit
3180b26a7f
2 changed files with 5 additions and 5 deletions
  1. 3 3
      main/inc/lib/online.inc.php
  2. 2 2
      main/inc/local.inc.php

+ 3 - 3
main/inc/lib/online.inc.php

@@ -482,7 +482,7 @@ function who_is_online_in_this_course_count($uid, $time_limit, $coursecode = nul
  */
 function courseLogout($logoutInfo)
 {
-    if (empty($logoutInfo['uid']) or empty($logoutInfo['cid'])) {
+    if (empty($logoutInfo['uid']) || empty($logoutInfo['cid'])) {
         return;
     }
     $sessionLifetime = api_get_configuration_value('session_lifetime');
@@ -491,7 +491,7 @@ function courseLogout($logoutInfo)
      * the function Tracking::get_time_spent_on_the_course() returns larger values (200h) due the condition:
      * login_course_date > now() - INTERVAL $session_lifetime SECOND
      */
-    if (empty($sessionLifetime) or $sessionLifetime > 86400) {
+    if (empty($sessionLifetime) || $sessionLifetime > 86400) {
         $sessionLifetime    = 3600; // 1 hour
     }
     if (!empty($logoutInfo) && !empty($logoutInfo['cid'])) {
@@ -527,4 +527,4 @@ function courseLogout($logoutInfo)
             Database::query($sql);
         }
     }
-}
+}

+ 2 - 2
main/inc/local.inc.php

@@ -142,7 +142,7 @@ $gidReq = isset($_GET["gidReq"]) ? intval($_GET["gidReq"]) : '';
 // Keep a trace of the course and session from which we are getting out, to
 // enable proper course logout tracking in courseLogout()
 $logoutInfo = [];
-if (!empty($logout) or !empty($cidReset)) {
+if (!empty($logout) || !empty($cidReset)) {
     $uid = 0;
     if (!empty($_SESSION['_user']) && !empty($_SESSION['_user']['user_id'])) {
         $uid = $_SESSION['_user']['user_id'];
@@ -1017,7 +1017,7 @@ if (isset($cidReset) && $cidReset) {
         }
     }
 
-    if (empty($_SESSION['_course']) or empty($_SESSION['_cid'])) { //no previous values...
+    if (empty($_SESSION['_course']) || empty($_SESSION['_cid'])) { //no previous values...
         $_cid = -1; // Set default values
         $_course = -1;
     } else {