From: stronk7 Date: Thu, 21 Sep 2006 17:09:28 +0000 (+0000) Subject: SQL ORs must be, always, "OR" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d7d05cf2f33f2aaf7e560327dd5608095bec6735;p=moodle.git SQL ORs must be, always, "OR" --- diff --git a/lib/accesslib.php b/lib/accesslib.php index de53594e0e..229abd0150 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -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.