Commit d73d68fc authored by Rebecca Blundell's avatar Rebecca Blundell Committed by Rebecca Blundell
Browse files

Bug 1817783: Lockblocks prevent a user from being deleted

Add code to remove lockblocks from a page
so that the page can successfully be deleted by the site admin
or the page owner.


Change-Id: I247bac245d3f9447c701b8db48dad9be15c15070
parent bfec8984
......@@ -994,6 +994,8 @@ class View {
//remove lock blocks, if they exist for this page
set_field('view', 'lockblocks', 0, 'id', $this->id, 'lockblocks', 1);
if ($blockinstanceids = get_column('block_instance', 'id', 'view', $this->id)) {
require_once(get_config('docroot') . 'blocktype/lib.php');
foreach ($blockinstanceids as $id) {
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