Merge branch 'MDL-57176-master' of git://github.com/damyon/moodle

This commit is contained in:
Dan Poltawski 2016-11-28 08:30:37 +00:00
commit 1cbc346092

View File

@ -1053,6 +1053,11 @@ class block_manager {
return;
}
// Never add a duplicate block required by theme.
if ($DB->record_exists('block_instances', array('blockname' => $blockname, 'requiredbytheme' => 1))) {
return;
}
$systemcontext = context_system::instance();
$defaultregion = $this->get_default_region();
// Add a special system wide block instance only for themes that require it.