MDL-29602 accesslib improvements
Refactoring and improvements of the accesslib.php library including prevention of access for not-logged-in users when forcelogin enabled, improved context caching, OOP refactoring of contexts, fixed context loading, deduplication of role definitions in user sessions, installation improvements, decoupling of enrolment checking from capability loading, added detection of deleted and non-existent users in has_capability(), new function accesslib test, auth and enrol upgrade notes. More details are available in tracker subtasks.
This commit is contained in:
@@ -2868,7 +2868,7 @@ class settings_navigation extends navigation_node {
|
||||
$context = $this->context;
|
||||
if ($context->contextlevel == CONTEXT_BLOCK) {
|
||||
$this->load_block_settings();
|
||||
$context = $DB->get_record_sql('SELECT ctx.* FROM {block_instances} bi LEFT JOIN {context} ctx ON ctx.id=bi.parentcontextid WHERE bi.id=?', array($context->instanceid));
|
||||
$context = $context->get_parent_context();
|
||||
}
|
||||
|
||||
switch ($context->contextlevel) {
|
||||
|
||||
Reference in New Issue
Block a user