You are here

function better_watchdog_ui_views_pre_build in Better Watchdog UI 7.2

Same name and namespace in other branches
  1. 7.3 better_watchdog_ui.module \better_watchdog_ui_views_pre_build()

Implements hook_views_pre_build().

File

./better_watchdog_ui.module, line 12
Provide views field and filter handlers, and allow bulk operations.

Code

function better_watchdog_ui_views_pre_build(&$view) {

  // Prevent form error if a type does not exist anymore after deleting entries.
  if ($view->name == 'better_watchdog_ui_view' && isset($_GET['type'])) {
    foreach ($_GET['type'] as $id => $value) {
      if (!_better_watchdog_ui_type_exists($value)) {
        unset($_GET['type'][$id]);
      }
    }
  }
}