]> git.mjollnir.org Git - moodle.git/commitdiff
SQL ORs must be, always, "OR"
authorstronk7 <stronk7>
Thu, 21 Sep 2006 17:09:28 +0000 (17:09 +0000)
committerstronk7 <stronk7>
Thu, 21 Sep 2006 17:09:28 +0000 (17:09 +0000)
lib/accesslib.php

index de53594e0ec246397a62f5b0bd2d77daac1be9f7..229abd015025ad339039fcdac4d12c9d3b3465b5 100755 (executable)
@@ -561,7 +561,7 @@ function load_user_capability($capability='', $context ='', $userid='') {
 
 /// Set up SQL fragments for timestart, timeend etc
     $now = time();
-    $timesql = "AND ((ra.timestart = 0 || ra.timestart < $now) && (ra.timeend = 0 || ra.timeend > $now))";
+    $timesql = "AND ((ra.timestart = 0 OR ra.timestart < $now) && (ra.timeend = 0 OR ra.timeend > $now))";
 
 /// Then we use 1 giant SQL to bring out all relevant capabilities.
 /// The first part gets the capabilities of orginal role.