Permalink
Browse files

Wrong logical operators used in SQL statements

  • Loading branch information...
1 parent 6af7cc2 commit f3f1b00d8ee94756315a4b8700d49bc0b8af5519 patrickslee committed Nov 18, 2005
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/forum/lib.php
View
@@ -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);

0 comments on commit f3f1b00

Please sign in to comment.