mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 05:25:08 +02:00
MDL-57386 blocklib: wrong variable in is_block_present
This isn't reachable code in core moodle, but themes/plugins could call is_block_present to trigger it.
This commit is contained in:
parent
5ef81f2b0b
commit
08d7c0e1ca
@ -246,7 +246,7 @@ class block_manager {
|
||||
return false;
|
||||
}
|
||||
|
||||
$undeletableblocks = self::get_undeletable_block_types();
|
||||
$requiredbythemeblocks = self::get_required_by_theme_block_types();
|
||||
foreach ($this->blockinstances as $region) {
|
||||
foreach ($region as $instance) {
|
||||
if (empty($instance->instance->blockname)) {
|
||||
@ -254,7 +254,7 @@ class block_manager {
|
||||
}
|
||||
if ($instance->instance->blockname == $blockname) {
|
||||
if ($instance->instance->requiredbytheme) {
|
||||
if (!in_array($block->name, $undeletableblocks)) {
|
||||
if (!in_array($blockname, $requiredbythemeblocks)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user