mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-47466 calendar: fixed error ORA-01795 in calendar_get_events
This commit is contained in:
parent
a2ed10a5e7
commit
c3f51a3c79
@ -689,7 +689,7 @@ function calendar_get_events($tstart, $tend, $users, $groups, $courses, $withdur
|
||||
return array();
|
||||
}
|
||||
|
||||
if((is_array($users) && !empty($users)) or is_numeric($users)) {
|
||||
if ((is_array($users) && !empty($users)) or is_numeric($users)) {
|
||||
// Events from a number of users
|
||||
if(!empty($whereclause)) $whereclause .= ' OR';
|
||||
list($insqlusers, $inparamsusers) = $DB->get_in_or_equal($users, SQL_PARAMS_NAMED);
|
||||
@ -703,7 +703,7 @@ function calendar_get_events($tstart, $tend, $users, $groups, $courses, $withdur
|
||||
// No user at all, do nothing
|
||||
}
|
||||
|
||||
if((is_array($groups) && !empty($groups)) or is_numeric($groups)) {
|
||||
if ((is_array($groups) && !empty($groups)) or is_numeric($groups)) {
|
||||
// Events from a number of groups
|
||||
if(!empty($whereclause)) $whereclause .= ' OR';
|
||||
list($insqlgroups, $inparamsgroups) = $DB->get_in_or_equal($groups, SQL_PARAMS_NAMED);
|
||||
@ -716,7 +716,7 @@ function calendar_get_events($tstart, $tend, $users, $groups, $courses, $withdur
|
||||
}
|
||||
// boolean false (no groups at all): we don't need to do anything
|
||||
|
||||
if((is_array($courses) && !empty($courses)) or is_numeric($courses)) {
|
||||
if ((is_array($courses) && !empty($courses)) or is_numeric($courses)) {
|
||||
if(!empty($whereclause)) $whereclause .= ' OR';
|
||||
list($insqlcourses, $inparamscourses) = $DB->get_in_or_equal($courses, SQL_PARAMS_NAMED);
|
||||
$whereclause .= " (groupid = 0 AND courseid $insqlcourses)";
|
||||
|
Loading…
x
Reference in New Issue
Block a user