? .completion.db
? .git
? .patch
? block.patch
? drushrc.php
? links.patch
? mgi.patch
? nmd.patch
? nrm.patch
? profile_render_array.patch
? tmp.patch
? tmp.patch.patch
? tmp.sql
? tracker.patch
? includes/.patch
? modules/comment/comment-node-type-form.js
? modules/node/node.diff.inc
? modules/node/node.pages-diff.inc
? modules/simpletest/tests/hook_url_rewrite.info
? modules/simpletest/tests/hook_url_rewrite.module
? modules/simpletest/tests/path.test
Index: modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.45
diff -u -F^f -p -r1.45 node.admin.inc
--- modules/node/node.admin.inc	26 Apr 2009 19:44:38 -0000	1.45
+++ modules/node/node.admin.inc	10 May 2009 16:49:29 -0000
@@ -620,7 +620,6 @@ function theme_node_admin_nodes($form) {
 }
 
 function node_multiple_delete_confirm(&$form_state, $nodes) {
-
   $form['nodes'] = array('#prefix' => '<ul>', '#suffix' => '</ul>', '#tree' => TRUE);
   // array_filter returns only elements with TRUE values
   foreach ($nodes as $nid => $value) {
@@ -642,10 +641,10 @@ function node_multiple_delete_confirm(&$
 
 function node_multiple_delete_confirm_submit($form, &$form_state) {
   if ($form_state['values']['confirm']) {
-    foreach ($form_state['values']['nodes'] as $nid => $value) {
-      node_delete($nid);
-    }
-    drupal_set_message(t('The items have been deleted.'));
+    node_delete_multiple(array_keys($form_state['values']['nodes']));
+    $count = count($form_state['values']['nodes']);
+    watchdog('content', 'Deleted @count posts.', array('@count' => $count));
+    drupal_set_message(t('Deleted @count posts.', array('@count' => $count)));
   }
   $form_state['redirect'] = 'admin/content/node';
   return;
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1045
diff -u -F^f -p -r1.1045 node.module
--- modules/node/node.module	9 May 2009 18:28:12 -0000	1.1045
+++ modules/node/node.module	10 May 2009 16:49:29 -0000
@@ -788,7 +788,8 @@ function node_invoke($node, $hook, $a2 =
  *   An array of node objects indexed by nid.
  */
 function node_load_multiple($nids = array(), $conditions = array(), $reset = FALSE) {
-  static $node_cache = array();
+  $node_cache = &drupal_static(__FUNCTION__, array());
+  
   if ($reset) {
     $node_cache = array();
   }
@@ -940,8 +941,9 @@ function node_load_multiple($nids = arra
  * @param $vid
  *   The revision ID.
  * @param $reset
- *   Whether to reset the internal node_load cache.
+ *   Whether to reset the node_load_multiple cache.
  *
+
  * @return
  *   A fully-populated node object.
  */
@@ -1160,39 +1162,50 @@ function _node_save_revision($node, $uid
 
 /**
  * Delete a node.
+ * 
+ * @param $nid
+ *   A node ID.
  */
 function node_delete($nid) {
+  node_delete_multiple(array($nid));
+}
 
-  $node = node_load($nid);
-
-  if (node_access('delete', $node)) {
-    db_delete('node')
-      ->condition('nid', $node->nid)
-      ->execute();
-    db_delete('node_revision')
-      ->condition('nid', $node->nid)
-      ->execute();
-    db_delete('history')
-      ->condition('nid', $node->nid)
-      ->execute();
+/**
+ * Delete multiple nodes.
+ * 
+ * @param $nids
+ *   An array of node IDs.
+ */
+function node_delete_multiple($nids) {
+  $nodes = node_load_multiple($nids, array());
+  
+  db_delete('node')
+  ->condition('nid', $nids, 'IN')
+  ->execute();
+  db_delete('node_revision')
+  ->condition('nid', $nids, 'IN')
+  ->execute();
+  db_delete('history')
+  ->condition('nid', $nids, 'IN')
+  ->execute();
 
+  foreach ($nodes as $nid => $node) {
     // Call the node-specific callback (if any):
     node_invoke($node, 'delete');
     module_invoke_all('node_delete', $node);
 
-    // Clear the page and block caches.
-    cache_clear_all();
-
     // Remove this node from the search index if needed.
     // This code is implemented in node module rather than in search module,
     // because node module is implementing search module's API, not the other
     // way around.
     if (module_exists('search')) {
-      search_wipe($node->nid, 'node');
+      search_wipe($nid, 'node');
     }
-    watchdog('content', '@type: deleted %title.', array('@type' => $node->type, '%title' => $node->title));
-    drupal_set_message(t('@type %title has been deleted.', array('@type' => node_get_types('name', $node), '%title' => $node->title)));
   }
+  
+  // Clear the page and block and node_load_multiple caches.
+  cache_clear_all();
+  drupal_static_reset('node_load_multiple');
 }
 
 /**
Index: modules/node/node.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.64
diff -u -F^f -p -r1.64 node.pages.inc
--- modules/node/node.pages.inc	9 May 2009 18:28:12 -0000	1.64
+++ modules/node/node.pages.inc	10 May 2009 16:49:29 -0000
@@ -521,7 +521,10 @@ function node_delete_confirm(&$form_stat
  */
 function node_delete_confirm_submit($form, &$form_state) {
   if ($form_state['values']['confirm']) {
+    $node = node_load($form_state['values']['nid']);
     node_delete($form_state['values']['nid']);
+    watchdog('content', '@type: deleted %title.', array('@type' => $node->type, '%title' => $node->title));
+    drupal_set_message(t('@type %title has been deleted.', array('@type' => node_get_types('name', $node), '%title' => $node->title)));
   }
 
   $form_state['redirect'] = '<front>';
