diff --git a/admin/blocks.php b/admin/blocks.php index b31da9ea004..f3faf4d1445 100644 --- a/admin/blocks.php +++ b/admin/blocks.php @@ -37,6 +37,7 @@ print_error('blockdoesnotexist', 'error'); } $DB->set_field('block', 'visible', '0', array('id'=>$block->id)); // Hide block + add_to_config_log('block_visibility', $block->visible, '0', $block->name); core_plugin_manager::reset_caches(); admin_get_root(true, false); // settings not required - only pages } @@ -46,6 +47,7 @@ print_error('blockdoesnotexist', 'error'); } $DB->set_field('block', 'visible', '1', array('id'=>$block->id)); // Show block + add_to_config_log('block_visibility', $block->visible, '1', $block->name); core_plugin_manager::reset_caches(); admin_get_root(true, false); // settings not required - only pages } diff --git a/lib/blocklib.php b/lib/blocklib.php index e3a386883ea..b8b2821c858 100644 --- a/lib/blocklib.php +++ b/lib/blocklib.php @@ -420,6 +420,7 @@ class block_manager { if (!in_array($block->name, $undeletableblocktypes)) { $undeletableblocktypes[] = $block->name; set_config('undeletableblocktypes', implode(',', $undeletableblocktypes)); + add_to_config_log('block_protect', "0", "1", $block->name); } } @@ -445,6 +446,7 @@ class block_manager { if (in_array($block->name, $undeletableblocktypes)) { $undeletableblocktypes = array_diff($undeletableblocktypes, array($block->name)); set_config('undeletableblocktypes', implode(',', $undeletableblocktypes)); + add_to_config_log('block_protect', "1", "0", $block->name); } }