Commit 45ed4271 authored by Damyon Wiese's avatar Damyon Wiese
Browse files

MDL-56902 blocks: no nav / settings in boost

Upgraded sites switching to boost should not see nav/settings blocks.
parent 51718b75
......@@ -2420,6 +2420,18 @@ function xmldb_main_upgrade($oldversion) {
// Main savepoint reached.
upgrade_main_savepoint(true, 2016111900.00);
}
if ($oldversion < 2016111900.02) {
// Change the existing site level admin and settings blocks to be requiredbytheme which means they won't show in boost.
$context = context_system::instance();
$params = array('blockname' => 'settings', 'parentcontextid' => $context->id);
$DB->set_field('block_instances', 'requiredbytheme', 1, $params);
$params = array('blockname' => 'navigation', 'parentcontextid' => $context->id);
$DB->set_field('block_instances', 'requiredbytheme', 1, $params);
// Main savepoint reached.
upgrade_main_savepoint(true, 2016111900.02);
}
return true;
}
......@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2016111900.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2016111900.02; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment