mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Wrong logical operators used in SQL statements
This commit is contained in:
parent
6af7cc2206
commit
f3f1b00d8e
1 changed files with 1 additions and 1 deletions
|
@ -1081,7 +1081,7 @@ function forum_search_posts($searchterms, $courseid, $page=0, $recordsperpage=50
|
||||||
$timelimit = '';
|
$timelimit = '';
|
||||||
if (!((isadmin() and !empty($CFG->admineditalways)) || isteacher($courseid))) {
|
if (!((isadmin() and !empty($CFG->admineditalways)) || isteacher($courseid))) {
|
||||||
$now = time();
|
$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);
|
$limit = sql_paging_limit($page, $recordsperpage);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue