From 85f101fa269ba93c324afd6ec738c2a5330dd8bb Mon Sep 17 00:00:00 2001 From: stronk7 Date: Thu, 21 Sep 2006 17:18:56 +0000 Subject: [PATCH] SQL ANDs mus be, always, "AND" :-P --- lib/accesslib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index 229abd0150..407033a652 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 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. -- 2.39.5