Index: webform.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform.module,v
retrieving revision 1.196.2.20
diff -u -r1.196.2.20 webform.module
--- webform.module	10 Apr 2010 01:06:13 -0000	1.196.2.20
+++ webform.module	10 Apr 2010 02:19:10 -0000
@@ -1881,28 +1881,11 @@
           'submission' => $submission,
         );
         drupal_mail('webform', 'submission', $address, $language, $mail_params, $email['from']);
-  
-        // Debugging output for email.
-        if (variable_get('webform_debug', 0) >= 2) {
-          drupal_set_message('E-mail Headers: <pre>' . check_plain(print_r($headers, TRUE)) . '</pre>To: ' . check_plain($address) . '<br />From: ' . check_plain($email['from']) . '<br />Subject: ' . check_plain($email['subject']) . '<br />E-mail Body: <pre>' . check_plain($email['message']) . '</pre>');
-        }
       }
 
     }
   }
 
-  // More debugging output.
-  if (variable_get('webform_debug', 0) >= 2) {
-    drupal_set_message('$form_state is: <pre>' . htmlentities(print_r($form_state, TRUE)) . '</pre>');
-    drupal_set_message('$_SERVER is: <pre>' . htmlentities(print_r($_SERVER, TRUE)) . '</pre>');
-    drupal_set_message('$_POST is: <pre>' . htmlentities(print_r($_POST, TRUE)) . '</pre>');
-  }
-
-  // Log to watchdog if normal debug is on.
-  if (variable_get('webform_debug', 0) >= 1) {
-    watchdog('webform', 'Submission posted to %title. <a href="!url">Results</a>. !details', array('%title' => $node->title, '!url' => url('node/' . $node->nid . '/submission/' . $sid), '!results' => "<br />\n<pre>" . htmlentities(print_r($form_state['values'], TRUE)) . '</pre>'));
-  }
-
   // Strip out empty tags added by WYSIWYG editors if needed.
   $confirmation = strlen(trim(strip_tags($node->webform['confirmation']))) ? $node->webform['confirmation'] : '';
   $redirect_url = trim($node->webform['redirect_url']);
Index: webform.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform.install,v
retrieving revision 1.40.2.8
diff -u -r1.40.2.8 webform.install
--- webform.install	27 Mar 2010 21:55:30 -0000	1.40.2.8
+++ webform.install	10 Apr 2010 02:19:09 -0000
@@ -350,7 +350,6 @@
 function webform_uninstall() {
   // Unset webform variables.
   variable_del('webform_use_cookies');
-  variable_del('webform_debug');
   variable_del('webform_enable_fieldset');
   variable_del('webform_default_from_address');
   variable_del('webform_default_from_name');
@@ -1150,6 +1149,16 @@
 }
 
 /**
+ * Remove the Webform Debug variable.
+ */
+function webform_update_6316() {
+  $ret = array();
+  variable_del('webform_debug');
+  $ret[] = array('success' => TRUE, 'query' => t('Removed the webform_debug variable which is no longer used.'));
+  return $ret;
+}
+
+/**
  * Recursively delete all files and folders in the specified filepath, then
  * delete the containing folder.
  *
Index: includes/webform.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/includes/webform.admin.inc,v
retrieving revision 1.4.2.2
diff -u -r1.4.2.2 webform.admin.inc
--- includes/webform.admin.inc	8 Mar 2010 01:04:08 -0000	1.4.2.2
+++ includes/webform.admin.inc	10 Apr 2010 02:19:10 -0000
@@ -130,14 +130,6 @@
     '#description' => t('By default, the configuration form for each webform allows the administrator to choose which roles may submit the form. You may want to allow users to always submit the form if you are using a separate node access module to control access to webform nodes themselves.'),
   );
 
-  $form['advanced']['webform_debug']  = array(
-    '#type' => 'select',
-    '#title' => t('Webforms debug'),
-    '#default_value' => variable_get('webform_debug', 0),
-    '#options' => array(0 => t('Off'), 1 => t('Log submissions'), 2 => t('Full debug')),
-    '#description' => t('Set to "Log submissions" to log all submissions in the watchdog. Set to "Full debug" to print debug info on submission.')
-  );
-
   $form = system_settings_form($form);
   $form['#theme'] = 'webform_admin_settings';
   $form['#submit'][] = 'webform_admin_settings_submit';
