]> git.mjollnir.org Git - moodle.git/commitdiff
SQL ANDs mus be, always, "AND" :-P
authorstronk7 <stronk7>
Thu, 21 Sep 2006 17:18:56 +0000 (17:18 +0000)
committerstronk7 <stronk7>
Thu, 21 Sep 2006 17:18:56 +0000 (17:18 +0000)
lib/accesslib.php

index 229abd015025ad339039fcdac4d12c9d3b3465b5..407033a6525e8d7ff6d006fc553ba9d9e76bb972 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 OR ra.timestart < $now) && (ra.timeend = 0 OR ra.timeend > $now))";
+    $timesql = "AND ((ra.timestart = 0 OR ra.timestart < $now) AND (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.