Index: modules/watchdog/watchdog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/watchdog/watchdog.module,v
retrieving revision 1.150
diff -U3 -r1.150 watchdog.module
--- modules/watchdog/watchdog.module	18 Aug 2006 18:58:47 -0000	1.150
+++ modules/watchdog/watchdog.module	18 Aug 2006 21:05:40 -0000
@@ -95,12 +95,15 @@
   }
 
   if (empty($_SESSION['watchdog_overview_filter'])) {
-    $_SESSION['watchdog_overview_filter'] = 'all';
+    $_SESSION['watchdog_overview_filter'] = array('all');
   }
 
   $form['filter'] = array(
-    '#type' => 'select',
-    '#title' => t('Filter by message type'),
+    '#type' => 'fieldset',
+    '#title' => t('Filter by message type')
+  );
+  $form['filter']['message_types'] = array (
+    '#type' => 'checkboxes',
     '#options' => $names,
     '#default_value' => $_SESSION['watchdog_overview_filter']
   );
@@ -127,8 +130,8 @@
   $sql = "SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid";
   $tablesort = tablesort_sql($header);
   $type = $_SESSION['watchdog_overview_filter'];
-  if ($type != 'all') {
-    $result = pager_query($sql ." WHERE w.type = '%s'". $tablesort, 50, 0, NULL, $type);
+  if (isset($type['all']) === FALSE) {
+    $result = pager_query($sql ." WHERE w.type IN ('" . implode("', '", array_values($type)) . "')". $tablesort, 50, 0, NULL);
   }
   else {
     $result = pager_query($sql . $tablesort, 50);
@@ -166,6 +169,18 @@
 
 function watchdog_form_overview_submit($form_id, $form) {
   global $form_values;
+  $options = array();
+
+  if (isset($form_values['message_types']['all']) && $form_values['message_types']['all']) {
+    $options['all'] = 'all';
+  }
+  else {
+    foreach($form_values['message_types'] as $type => $name) {
+      if ($name) {
+        $options[$type] = db_escape_string($type);
+      }
+    }
+  }
   $_SESSION['watchdog_overview_filter'] = $form_values['filter'];
 }
 
