mirror of
https://github.com/moodle/moodle.git
synced 2025-02-19 07:41:02 +01:00
Wrong logical operators used in SQL statements
This commit is contained in:
parent
6af7cc2206
commit
f3f1b00d8e
@ -1081,7 +1081,7 @@ function forum_search_posts($searchterms, $courseid, $page=0, $recordsperpage=50
|
||||
$timelimit = '';
|
||||
if (!((isadmin() and !empty($CFG->admineditalways)) || isteacher($courseid))) {
|
||||
$now = time();
|
||||
$timelimit = " AND (d.userid = $USER->id || ((d.timestart = 0 || d.timestart <= $now) && (d.timeend = 0 || d.timeend > $now))";
|
||||
$timelimit = " AND (d.userid = $USER->id OR ((d.timestart = 0 OR d.timestart <= $now) AND (d.timeend = 0 OR d.timeend > $now))";
|
||||
}
|
||||
|
||||
$limit = sql_paging_limit($page, $recordsperpage);
|
||||
|
Loading…
x
Reference in New Issue
Block a user