MDL-14817 fixing recent regressions

This commit is contained in:
Petr Skoda 2010-10-13 08:29:22 +00:00
parent 42c32efdf2
commit 0831484c2a

View File

@ -1563,7 +1563,12 @@ function remove_temp_roles($context, array $accessdata) {
WHERE ra.contextid = :contextid AND ra.userid = :userid";
$ras = $DB->get_records_sql($sql, array('contextid'=>$context->id, 'userid'=>$USER->id));
$accessdata['ra'][$context->path] = array_combine(array_keys($ras), array_keys($ras));
if ($ras) {
$accessdata['ra'][$context->path] = array_combine(array_keys($ras), array_keys($ras));
} else {
$accessdata['ra'][$context->path] = array();
}
return $accessdata;
}