fixed error in fetch_context_capabilities() when no local capabilities defined in context

This commit is contained in:
skodak 2006-09-22 21:31:19 +00:00
parent adbffcb9fe
commit 16e2e2f394

View File

@ -1946,7 +1946,9 @@ function fetch_context_capabilities($context) {
return false;
}
$records = get_records_sql($SQL.' '.$sort);
if (!$records = get_records_sql($SQL.' '.$sort)) {
$records = array();
}
$contextindependentcaps = fetch_context_independent_capabilities();
$records = array_merge($records, $contextindependentcaps);
@ -2750,4 +2752,4 @@ function get_users_from_role_on_context($role, $context) {
AND roleid = $role->id");
}
?>
?>