Commit fc89251a authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Require blocktype lib in view delete

parent 4ad41ebb
...@@ -270,6 +270,7 @@ class View { ...@@ -270,6 +270,7 @@ class View {
delete_records('view_tag','view',$this->id); delete_records('view_tag','view',$this->id);
delete_records('usr_watchlist_view','view',$this->id); delete_records('usr_watchlist_view','view',$this->id);
if ($blockinstanceids = get_column('block_instance', 'id', 'view', $this->id)) { if ($blockinstanceids = get_column('block_instance', 'id', 'view', $this->id)) {
require_once(get_config('docroot') . 'blocktype/lib.php');
foreach ($blockinstanceids as $id) { foreach ($blockinstanceids as $id) {
$bi = new BlockInstance($id); $bi = new BlockInstance($id);
$bi->delete(); $bi->delete();
......
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