You are here

function watchdog_form_overview in Drupal 5

1 string reference to 'watchdog_form_overview'
watchdog_overview in modules/watchdog/watchdog.module
Menu callback; displays a listing of log messages.

File

modules/watchdog/watchdog.module, line 81
System monitoring and logging for administrators.

Code

function watchdog_form_overview() {
  $names['all'] = t('all messages');
  foreach (_watchdog_get_message_types() as $type) {
    $names[$type] = t('!type messages', array(
      '!type' => t($type),
    ));
  }
  if (empty($_SESSION['watchdog_overview_filter'])) {
    $_SESSION['watchdog_overview_filter'] = 'all';
  }
  $form['filter'] = array(
    '#type' => 'select',
    '#title' => t('Filter by message type'),
    '#options' => $names,
    '#default_value' => $_SESSION['watchdog_overview_filter'],
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Filter'),
  );
  $form['#redirect'] = FALSE;
  return $form;
}