mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 05:25:08 +02:00
Merge branch 'MDL-57386-master' of git://github.com/damyon/moodle
This commit is contained in:
commit
caf52b578b
@ -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