Index: components/time.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/components/time.inc,v
retrieving revision 1.24.2.1
diff -u -r1.24.2.1 time.inc
--- components/time.inc	3 Mar 2010 02:51:31 -0000	1.24.2.1
+++ components/time.inc	8 Mar 2010 01:01:40 -0000
@@ -264,7 +264,8 @@
     ' ORDER BY sid,no ASC ';
 
   $result = db_query($query, array_merge(array($component['nid'], $component['cid']), $sids));
-  // build an array of timestamps from entered values.
+
+  // Build an array of timestamps from entered values.
   $timestamps = array();
   $submissions = 1;
   while ($row = db_fetch_array($result)) {
Index: components/date.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/components/date.inc,v
retrieving revision 1.29.2.1
diff -u -r1.29.2.1 date.inc
--- components/date.inc	3 Mar 2010 02:51:31 -0000	1.29.2.1
+++ components/date.inc	8 Mar 2010 01:01:39 -0000
@@ -313,7 +313,8 @@
     ' ORDER BY sid,no ASC ';
 
   $result = db_query($query, array_merge(array($component['nid'], $component['cid']), $sids));
-  // build an array of timestamps from entered values.
+
+  // Build an array of timestamps from entered values.
   $timestamps = array();
   $submissions = 1;
   while ($row = db_fetch_array($result)) {
Index: components/select.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/components/select.inc,v
retrieving revision 1.39.2.1
diff -u -r1.39.2.1 select.inc
--- components/select.inc	3 Mar 2010 02:51:31 -0000	1.39.2.1
+++ components/select.inc	8 Mar 2010 01:01:40 -0000
@@ -521,14 +521,14 @@
   $sid_placeholders = count($sids) ? array_fill(0, count($sids), "'%s'") : array();
   $sid_filter = count($sids) ? " AND sid IN (" . implode(",", $sid_placeholders) . ")" : "";
 
-  $not = $show_other_results ? 'NOT ' : '';
+  $option_operator = $show_other_results ? 'NOT IN' : 'IN';
   $placeholders = count($options) ? array_fill(0, count($options), "'%s'") : array();
   $query = 'SELECT data, count(data) as datacount ' .
     ' FROM {webform_submitted_data} ' .
     ' WHERE nid = %d ' .
     ' AND cid = %d ' .
     " AND data != ''" . $sid_filter .
-    ($placeholders ? ' AND data ' . $not . 'IN (' . implode(',', $placeholders) . ')' : '') .
+    ($placeholders ? ' AND data ' . $option_operator . ' (' . implode(',', $placeholders) . ')' : '') .
     ' GROUP BY data ';
 
   $count_query = 'SELECT count(*) as datacount ' .
Index: includes/webform.components.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/includes/webform.components.inc,v
retrieving revision 1.25.2.1
diff -u -r1.25.2.1 webform.components.inc
--- includes/webform.components.inc	3 Mar 2010 02:51:31 -0000	1.25.2.1
+++ includes/webform.components.inc	8 Mar 2010 01:01:40 -0000
@@ -163,7 +163,7 @@
 
   $node = $form['#node'];
 
-  $headers = array(t('Name'), t('Type'), t('Value'), t('Mandatory'), t('Weight'), array('data' => t('Operations'), 'colspan' => 3));
+  $header = array(t('Name'), t('Type'), t('Value'), t('Mandatory'), t('Weight'), array('data' => t('Operations'), 'colspan' => 3));
   $rows = array();
 
   // Add a row containing form elements for a new item.
@@ -261,7 +261,7 @@
   }
 
   $output = '';
-  $output .= theme('table', $headers, $rows, array('id' => 'webform-components'));
+  $output .= theme('table', $header, $rows, array('id' => 'webform-components'));
   $output .= drupal_render($form);
   return $output;
 }
Index: includes/webform.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/includes/webform.admin.inc,v
retrieving revision 1.4.2.1
diff -u -r1.4.2.1 webform.admin.inc
--- includes/webform.admin.inc	3 Mar 2010 02:51:31 -0000	1.4.2.1
+++ includes/webform.admin.inc	8 Mar 2010 01:01:40 -0000
@@ -169,8 +169,8 @@
     $row = array();
     $row[] = $form['components'][$key]['#title'];
     $row[] = $form['components'][$key]['#description'];
-    unset($form['components'][$key]['#title']);
-    unset($form['components'][$key]['#description']);
+    $form['components'][$key]['#title'] = NULL;
+    $form['components'][$key]['#description'] = NULL;
     $row[] = array('data' => drupal_render($form['components'][$key]), 'align' => 'center');
     $rows[] = $row;
   }
@@ -181,8 +181,7 @@
     '#value' => theme('table', $header, $rows)
   );
 
-  $output = drupal_render($form);
-  return $output;
+  return drupal_render($form);
 }
 
 /**
Index: includes/webform.emails.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/includes/webform.emails.inc,v
retrieving revision 1.9.2.1
diff -u -r1.9.2.1 webform.emails.inc
--- includes/webform.emails.inc	3 Mar 2010 02:51:31 -0000	1.9.2.1
+++ includes/webform.emails.inc	8 Mar 2010 01:01:40 -0000
@@ -90,7 +90,7 @@
 
   $node = $form['#node'];
 
-  $headers = array(t('E-mail to'), t('Subject'), t('From'), array('data' => t('Operations'), 'colspan' => 2));
+  $header = array(t('E-mail to'), t('Subject'), t('From'), array('data' => t('Operations'), 'colspan' => 2));
   $rows = array();
 
   if (!empty($form['emails'])) {
@@ -117,7 +117,7 @@
   $rows[] = array('data' => $row_data, 'class' => 'webform-add-form');
 
   $output = '';
-  $output .= theme('table', $headers, $rows, array('id' => 'webform-emails'));
+  $output .= theme('table', $header, $rows, array('id' => 'webform-emails'));
   $output .= drupal_render($form);
   return $output;
 }
Index: includes/webform.submissions.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/includes/webform.submissions.inc,v
retrieving revision 1.18.2.1
diff -u -r1.18.2.1 webform.submissions.inc
--- includes/webform.submissions.inc	3 Mar 2010 02:51:31 -0000	1.18.2.1
+++ includes/webform.submissions.inc	8 Mar 2010 01:01:41 -0000
@@ -318,7 +318,6 @@
       $submissions[$row->sid]->remote_addr = $row->remote_addr;
       $submissions[$row->sid]->uid = $row->uid;
       $submissions[$row->sid]->name = $row->name;
-      $submissions[$row->sid]->status = $row->status;
       $submissions[$row->sid]->is_draft = $row->is_draft;
     }
     $submissions[$row->sid]->data[$row->cid]['value'][$row->no] = $row->data;
@@ -470,5 +469,5 @@
  * Preprocess function for webform-submission-navigation.tpl.php
  */
 function template_preprocess_webform_submission_information(&$vars) {
-  $vars['account'] = user_load(array('uid' => $vars['submission']->uid));
+  $vars['account'] = user_load($vars['submission']->uid);
 }
Index: includes/webform.report.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/includes/webform.report.inc,v
retrieving revision 1.16.2.1
diff -u -r1.16.2.1 webform.report.inc
--- includes/webform.report.inc	3 Mar 2010 02:51:31 -0000	1.16.2.1
+++ includes/webform.report.inc	8 Mar 2010 01:01:41 -0000
@@ -370,7 +370,7 @@
   );
 
   $csv_components = array(
-    '' => t('Submission information'),
+    'info' => t('Submission information'),
     'serial' => '-' . t('Submission Number'),
     'sid' => '-' . t('Submission ID'),
     'time' => '-' . t('Time'),
@@ -433,6 +433,7 @@
     array('', 'X', 'X'),
   );
 
+  $element['separate']['#attributes']['class'] = '';
   $element['separate']['#description'] = theme('table', $header, $rows);
   $element['separate']['#description'] .= t('Separate options are more suitable for building reports, graphs, and statistics in a spreadsheet application.');
   $output .= drupal_render($element['separate']);
@@ -445,13 +446,11 @@
     array('Option B,Option C'),
   );
 
+  $element['separate']['#attributes']['class'] = '';
   $element['compact']['#description'] = theme('table', $header, $rows);
   $element['compact']['#description'] .= t('Compact options are more suitable for importing data into other systems.');
   $output .= drupal_render($element['compact']);
 
-  $element['#type'] = 'markup';
-  $element['#value'] = $output;
-
   return $output;
 }
 
@@ -659,7 +658,7 @@
   $question_number = 0;
   $single = isset($analysis_component);
 
-  $headers = array(
+  $header = array(
     $single ? $analysis_component['name'] : t('Q'),
     array('data' => $single ? '&nbsp' : t('responses'), 'colspan' => '10')
   );
@@ -681,5 +680,5 @@
     $rows[] = array(array('data' => t('There are no submissions for this form. <a href="!url">View this form</a>.', array('!url' => url('node/' . $node->nid))), 'colspan' => 20));
   }
 
-  return theme('table', $headers, $rows);
+  return theme('table', $header, $rows);
 }
Index: webform.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform.module,v
retrieving revision 1.196.2.1
diff -u -r1.196.2.1 webform.module
--- webform.module	3 Mar 2010 02:51:31 -0000	1.196.2.1
+++ webform.module	8 Mar 2010 01:01:39 -0000
@@ -572,7 +572,7 @@
       'file' => 'includes/webform.report.inc',
     ),
     'webform_results_submissions' => array(
-      'arguments' => array('node' => NULL, 'submissions' => NULL, 'total_count' => NULL, 'pager_count' => NULL),
+      'arguments' => array('node' => NULL, 'submissions' => NULL, 'total_count' => 0, 'pager_count' => 0),
       'file' => 'includes/webform.report.inc',
     ),
     'webform_results_table_header' => array(
Index: webform.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform.install,v
retrieving revision 1.40.2.1
diff -u -r1.40.2.1 webform.install
--- webform.install	3 Mar 2010 02:51:31 -0000	1.40.2.1
+++ webform.install	8 Mar 2010 01:01:38 -0000
@@ -790,7 +790,7 @@
     if ($file && isset($file['filename'])) {
       // Create an entry in the files table if needed.
       if (!isset($file['fid'])) {
-        db_query("INSERT INTO {files} (uid, filename, filepath, filemime, filesize, status, timestamp) VALUES (%d, %d, '%s', '%s', '%s', %d, 1, %d)", $row->uid, $file['filename'], $file['filepath'], $file['filemime'], $file['filesize'], $row->submitted);
+        db_query("INSERT INTO {files} (uid, filename, filepath, filemime, filesize, status, timestamp) VALUES (%d, '%s', '%s', '%s', %d, 1, %d)", $row->uid, $file['filename'], $file['filepath'], $file['filemime'], $file['filesize'], $row->submitted);
         $fid = db_last_insert_id('files', 'fid');
       }
       else {
