Index: autoadmin.delete.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/autoadmin/autoadmin.delete.inc,v
retrieving revision 1.2
diff -u -p -r1.2 autoadmin.delete.inc
--- autoadmin.delete.inc	6 Dec 2009 21:11:00 -0000	1.2
+++ autoadmin.delete.inc	7 Aug 2010 11:54:03 -0000
@@ -88,7 +88,7 @@ function autoadmin_delete_confirm_submit
       drupal_set_message(t('Your %title could not be deleted. Maybe someone deleted it before you did.', array('%title' => $form_state['values']['schema']['title'])));
     }
   }
-  drupal_goto($form_state['values']['schema']['path'] . '/list');
+  $form_state['redirect'] = $form_state['values']['schema']['path'] . '/list';
 }
 
 /**
Index: autoadmin.edit.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/autoadmin/autoadmin.edit.inc,v
retrieving revision 1.2
diff -u -p -r1.2 autoadmin.edit.inc
--- autoadmin.edit.inc	6 Dec 2009 21:11:00 -0000	1.2
+++ autoadmin.edit.inc	7 Aug 2010 11:54:03 -0000
@@ -108,14 +108,48 @@ function autoadmin_edit_form_submit($for
     $data[$field['key']] = $values[$field['key']];
   }
   $pk = $values['schema']['primary key'][0];
-  if (!empty($values[$pk])) {
-		drupal_write_record($values['schema']['table'], $data, $pk);
+  if (empty($values[$pk])) {
+    unset($data[$pk]);
+    $status = drupal_write_record($values['schema']['table'], $data);
+    if ($status) {
+      $form_state['new_record_' . $pk] = $data[$pk];
+      drupal_set_message(
+        t('New record %new_record_id inserted in table %table_name.',
+          array(
+            '%new_record_id' => $data[$pk],
+            '%table_name' => $values['schema']['table'],
+          )
+      ));
+    }
+    else {
+      drupal_set_message(
+        t('New record insertion failed in table %table_name.',
+          array('%table_name' => $values['schema']['table'])
+      ));
+    }
   }
   else {
-    unset($data[$pk]);
-		$status = drupal_write_record($values['schema']['table'], $data);
+    $status = drupal_write_record($values['schema']['table'], $data, $pk);
+    if ($status) {
+      drupal_set_message(
+        t('Record %record_id updated in table %table_name.',
+          array(
+            '%record_id' => $data[$pk],
+            '%table_name' => $values['schema']['table'],
+          )
+      ));
+    }
+    else {
+      drupal_set_message(
+        t('Record %record_id update failed in table %table_name.',
+          array(
+            '%record_id' => $data[$pk],
+            '%table_name' => $values['schema']['table'],
+          )
+      ));
+    }
   }
-  drupal_goto($values['schema']['path'] . '/list');
+  $form_state['redirect'] = $values['schema']['path'] . '/list';
 }
 
 /**
Index: autoadmin.schema.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/autoadmin/autoadmin.schema.inc,v
retrieving revision 1.2
diff -u -p -r1.2 autoadmin.schema.inc
--- autoadmin.schema.inc	6 Dec 2009 21:11:00 -0000	1.2
+++ autoadmin.schema.inc	7 Aug 2010 11:54:04 -0000
@@ -71,7 +71,7 @@ function autoadmin_schema_default_settin
 }
 
 /**
- * Get schema, do som processing and return result.
+ * Get schema, do some processing and return result.
  *
  * @param array $schema
  * @param array $options
