Commit 97bcd0d9 authored by Nigel McNie's avatar Nigel McNie
Browse files

Install the 'blockinstancecommit' event. Make sure that events from blocktypes...

Install the 'blockinstancecommit' event. Make sure that events from blocktypes are installed correctly.
parent 6ac6d8e9
......@@ -397,10 +397,11 @@ function upgrade_plugin($upgrade) {
}
$exists = false;
$table = $plugintype . '_event_subscription';
$block = blocktype_namespaced_to_single($pluginname);
if (empty($upgrade->install)) {
$exists = get_record($table, 'plugin' , $pluginname, 'event', $event->event);
$exists = get_record($table, 'plugin' , $block, 'event', $event->event);
}
$event->plugin = $pluginname;
$event->plugin = $block;
if (empty($exists)) {
insert_record($table, $event);
}
......@@ -618,6 +619,7 @@ function core_install_firstcoredata_defaults() {
'deleteartefact',
'saveview',
'deleteview',
'blockinstancecommit',
);
foreach ($eventtypes as $et) {
......
Markdown is supported
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