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