mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
SQL ANDs mus be, always, "AND" :-P
This commit is contained in:
parent
669d3ecd7c
commit
85f101fa26
1 changed files with 1 additions and 1 deletions
|
@ -561,7 +561,7 @@ function load_user_capability($capability='', $context ='', $userid='') {
|
||||||
|
|
||||||
/// Set up SQL fragments for timestart, timeend etc
|
/// Set up SQL fragments for timestart, timeend etc
|
||||||
$now = time();
|
$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.
|
/// Then we use 1 giant SQL to bring out all relevant capabilities.
|
||||||
/// The first part gets the capabilities of orginal role.
|
/// The first part gets the capabilities of orginal role.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue