function cpn_alter_block in Code per Node 7
Adds CPN fields to block table, as defined in cpn_schema_alter().
2 calls to cpn_alter_block()
- cpn_install in ./
cpn.install - Implements hook_install().
- cpn_modules_installed in ./
cpn.install - Implements hook_modules_installed().
File
- ./
cpn.install, line 254 - Installation, schema and update hook implementations.
Code
function cpn_alter_block() {
$schema = array();
cpn_schema_alter($schema);
foreach ($schema['block']['fields'] as $name => $spec) {
if (!db_field_exists('block', $name)) {
db_add_field('block', $name, $spec);
}
}
}