mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-53566 core: Remove unused ancestorlocked field
This was originalyl intended as a performance improvement, but the parent is already stored, and once calculated the value of locked is already returned.
This commit is contained in:
parent
0333213585
commit
56db1a2d7c
@ -4743,15 +4743,6 @@ abstract class context extends stdClass implements IteratorAggregate {
|
||||
*/
|
||||
protected $_locked;
|
||||
|
||||
/**
|
||||
* Whether any parent of the current context is locked.
|
||||
*
|
||||
* Can be accessed publicly through $context->ancestorlocked.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $_ancestorlocked;
|
||||
|
||||
/**
|
||||
* @var array Context caching info
|
||||
*/
|
||||
@ -5366,8 +5357,7 @@ abstract class context extends stdClass implements IteratorAggregate {
|
||||
}
|
||||
|
||||
if ($parent = $this->get_parent_context()) {
|
||||
$this->_ancestorlocked = $parent->is_locked();
|
||||
return $this->_ancestorlocked;
|
||||
return $parent->is_locked();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user