watchdog_form_overview

Versions
5
watchdog_form_overview()

Code

modules/watchdog/watchdog.module, line 81

<?php
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;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.