Commit ad551b6e authored by catch's avatar catch

Issue #1887692 by xjm: Clean up unused {block_node_type} table and references.

parent 289e12fb
......@@ -378,33 +378,6 @@ function node_schema() {
'primary key' => array('type'),
);
$schema['block_node_type'] = array(
'description' => 'Sets up display criteria for blocks based on content types',
'fields' => array(
'module' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'description' => "The block's origin module, from {block}.module.",
),
'delta' => array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'description' => "The block's unique delta within module, from {block}.delta.",
),
'type' => array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'description' => "The machine-readable name of this type from {node_type}.type.",
),
),
'primary key' => array('module', 'delta', 'type'),
'indexes' => array(
'type' => array('type'),
),
);
return $schema;
}
......
......@@ -2011,23 +2011,6 @@ function node_form_block_admin_configure_alter(&$form, &$form_state) {
);
}
/**
* Implements hook_modules_uninstalled().
*
* Cleans up the {block_node_type} table from modules' blocks.
*/
function node_modules_uninstalled($modules) {
// Remove the block visibility settings for all node types.
$block_configs = config_get_storage_names_with_prefix('plugin.core.block');
foreach ($block_configs as $config_id) {
$config = config($config_id);
$node_types = $config->get('visibility.node_type.types');
if (!empty($node_types)) {
$config->clear('visibility.node_type.types');
}
}
}
/**
* Implements hook_block_access().
*
......
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