function better_watchdog_ui_entity_enable in Better Watchdog UI 7.3
Same name and namespace in other branches
- 8 better_watchdog_ui_entity/better_watchdog_ui_entity.install \better_watchdog_ui_entity_enable()
- 7 better_watchdog_ui_entity/better_watchdog_ui_entity.install \better_watchdog_ui_entity_enable()
- 7.2 better_watchdog_ui_entity/better_watchdog_ui_entity.install \better_watchdog_ui_entity_enable()
Implements hook_enable().
File
- better_watchdog_ui_entity/
better_watchdog_ui_entity.install, line 11 - Installation and update functions.
Code
function better_watchdog_ui_entity_enable() {
// Allow our view to override the basic watchdog detail page
// by increasing module weight in system database table.
$weight = db_select('system', 's')
->fields('s', array(
'weight',
))
->condition('s.name', 'dblog', '=')
->condition('type', 'module')
->execute()
->fetchField();
db_update('system')
->fields(array(
'weight' => $weight + 1,
))
->condition('name', 'better_watchdog_ui_entity')
->condition('type', 'module')
->execute();
}