--- modules/system/system.module.orig	2009-12-16 12:47:10.000000000 -0800
+++ modules/system/system.module	2010-03-08 13:50:55.000000000 -0800
@@ -1338,9 +1338,9 @@
       'type' => 'system',
       'configurable' => TRUE,
       'hooks' => array(
-        'nodeapi' => array('view', 'insert', 'update', 'delete'),
-        'comment' => array('view', 'insert', 'update', 'delete'),
-        'user' => array('view', 'insert', 'update', 'delete', 'login'),
+        'nodeapi' => array('insert', 'update', 'delete'),
+        'comment' => array('insert', 'update', 'delete'),
+        'user' => array('insert', 'update', 'delete', 'login'),
       )
     )
   );
@@ -1885,7 +1885,11 @@
 }
 
 function system_goto_action($object, $context) {
-  drupal_goto($context['url']);
+  // We should not redirect on administrative or batch actions.
+  $path = arg(0);
+  if ($path !== 'admin' && $path !== 'batch') {
+    $_GET['destination'] = $context['url'];
+  }
 }
 
 /**
