Index: nat.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nat/nat.admin.inc,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 nat.admin.inc
--- nat.admin.inc	4 Mar 2010 21:51:11 -0000	1.1.2.3
+++ nat.admin.inc	15 May 2010 21:34:23 -0000
@@ -71,16 +71,14 @@
  * Process NAT settings form submissions.
  */
 function nat_settings_form_submit($form, &$form_state) {
-  $form_values = $form_state['values'];
+  unset($form_state['values']['form_id'], $form_state['values']['form_build_id'], $form_state['values']['submit'], $form_state['values']['op'], $form_state['values']['form_token']);
 
-  unset($form_values['form_id'], $form_values['form_build_id'], $form_values['submit'], $form_values['op'], $form_values['form_token']);
+  $form_state['values']['body'] = array_filter($form_state['values']['body']);
+  $form_state['values']['delete'] = array_filter($form_state['values']['delete']);
+  $form_state['values']['node_links'] = array_filter($form_state['values']['node_links']);
+  $form_state['values']['related'] = array_filter($form_state['values']['related']);
 
-  $form_values['body'] = array_filter($form_values['body']);
-  $form_values['delete'] = array_filter($form_values['delete']);
-  $form_values['node_links'] = array_filter($form_values['node_links']);
-  $form_values['related'] = array_filter($form_values['related']);
-
-  variable_set('nat_config', $form_values);
+  variable_set('nat_config', $form_state['values']);
 
   drupal_set_message(t('Configuration settings saved.'));
 }
Index: nat.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nat/nat.install,v
retrieving revision 1.9.2.1
diff -u -r1.9.2.1 nat.install
--- nat.install	4 Mar 2010 21:51:11 -0000	1.9.2.1
+++ nat.install	15 May 2010 21:43:15 -0000
@@ -50,19 +50,12 @@
  * Add a vid column to the NAT table.
  */
 function nat_update_2() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysqli':
-    case 'mysql':
-      $ret[] = update_sql("ALTER TABLE {nat} ADD vid int NOT NULL DEFAULT 0");
-      break;
-    case 'pgsql':
-      db_add_column($ret, 'nat', 'vid', 'int', array('not null' => TRUE, 'default' => 0));
-      break;
-  }
+  $ret = array();
+  db_add_field($ret, 'nat', 'vid', 'int', array('not null' => TRUE, 'default' => 0));
 
   $result = db_query('SELECT n.nid, n.tid, td.vid FROM {nat} n INNER JOIN {term_data} td USING (tid)');
   while ($node = db_fetch_array($result)) {
-    db_query('UPDATE {nat} SET vid = %d WHERE nid = %d AND tid = %d', $node['vid'], $node['nid'], $node['tid']);
+    $ret[] = update_sql(sprintf('UPDATE {nat} SET vid = %d WHERE nid = %d AND tid = %d', $node['vid'], $node['nid'], $node['tid']));
   }
 
   return $ret;

