MDL-28348 prevent circular references in meta handler for enrolments

This commit is contained in:
Petr Skoda
2011-07-17 20:36:12 +02:00
parent 5b2904c8f8
commit fc7cd35c81
+5
View File
@@ -128,6 +128,11 @@ class enrol_meta_handler {
return true;
}
if ($ue->enrol === 'meta') {
// prevent circular dependencies - we can not sync meta enrolments recursively
return true;
}
// does anything want to sync with this parent?
if (!$enrols = $DB->get_records('enrol', array('customint1'=>$ue->courseid, 'enrol'=>'meta'), 'id ASC')) {
return true;