You are here

function better_watchdog_ui_entity_disable in Better Watchdog UI 7.2

Same name and namespace in other branches
  1. 8 better_watchdog_ui_entity/better_watchdog_ui_entity.install \better_watchdog_ui_entity_disable()
  2. 7.3 better_watchdog_ui_entity/better_watchdog_ui_entity.install \better_watchdog_ui_entity_disable()
  3. 7 better_watchdog_ui_entity/better_watchdog_ui_entity.install \better_watchdog_ui_entity_disable()

Implements hook_disable().

File

better_watchdog_ui_entity/better_watchdog_ui_entity.install, line 31
Installation and update functions.

Code

function better_watchdog_ui_entity_disable() {

  // Reset the weight to be smaller than the dblog module.
  $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();
}