You are here

function _views_watchdog_get_type in Views Watchdog 6.2

Same name and namespace in other branches
  1. 6.3 views_watchdog.module \_views_watchdog_get_type()
  2. 7.3 views_watchdog.module \_views_watchdog_get_type()

Helper function; retrieves list of watchdog types.

1 call to _views_watchdog_get_type()
views_handler_filter_watchdog_type::get_value_options in views/handlers/views_handler_filter_watchdog_type.inc

File

./views_watchdog.module, line 121
This module extends the Views module and allows to create customized lists (pages, blocks, feeds) of watchdog entries.

Code

function _views_watchdog_get_type() {
  static $type = array();
  if (!$type) {
    $result = db_query('SELECT DISTINCT(type) FROM {watchdog} ORDER BY type');
    while ($record = db_fetch_object($result)) {
      $type[] = $record->type;
    }
  }
  return $type;
}