function badbehavior_install in Bad Behavior 7.2
Same name and namespace in other branches
- 5.2 badbehavior.install \badbehavior_install()
- 6.2 badbehavior.install \badbehavior_install()
- 6 badbehavior.install \badbehavior_install()
Implements hook_install().
File
- ./
badbehavior.install, line 104 - Install, update and uninstall functions for the Bad Behavior module.
Code
function badbehavior_install() {
// Set module weight for the badbehavior module
$thestatus = array();
$thestatus[] = db_update('system')
->fields(array(
'weight' => -999,
))
->condition('type', 'module', '=')
->condition('name', 'badbehavior', '=')
->execute();
// If there is one FALSE value in the status array, there was an error.
if (array_search(FALSE, $thestatus) !== FALSE) {
drupal_set_message(st('Setting the module weight of Bad Behavior failed.'), 'error');
}
}