You are here

function better_watchdog_ui_init in Better Watchdog UI 8

Same name and namespace in other branches
  1. 7 better_watchdog_ui.module \better_watchdog_ui_init()

Implements hook_init().

File

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

Code

function better_watchdog_ui_init() {
  $path = drupal_strtolower(drupal_get_path_alias($_GET['q']));
  if ($path != BETTER_WATCHDOG_UI_VIEW_PATH) {
    return;
  }
  if (isset($_GET['type'])) {
    foreach ($_GET['type'] as $id => $value) {
      if (!_better_watchdog_ui_type_exists($value)) {
        unset($_GET['type'][$id]);
      }
    }
  }
}