? Drupal_Head.kpf
? node-load-mulitple_0_0.patch
? node_author_patch_with_test.patch
? sites/all/modules/devel
? sites/default/files
? sites/default/settings.php
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.961
diff -u -p -r1.961 common.inc
--- includes/common.inc	15 Aug 2009 06:20:20 -0000	1.961
+++ includes/common.inc	16 Aug 2009 20:35:24 -0000
@@ -4529,12 +4529,12 @@ function drupal_schema_fields_sql($table
   if ($prefix) {
     $columns = array();
     foreach ($fields as $field) {
-      $columns[] = "$prefix.$field";
+      $columns["$prefix.$field"] = "$prefix.$field";
     }
     return $columns;
   }
   else {
-    return $fields;
+    return drupal_map_assoc($fields);
   }
 }
 
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1099
diff -u -p -r1.1099 node.module
--- modules/node/node.module	14 Aug 2009 13:53:01 -0000	1.1099
+++ modules/node/node.module	16 Aug 2009 20:35:25 -0000
@@ -760,6 +760,10 @@ function node_load_multiple($nids = arra
 
     // nid is provided by node, so remove it.
     unset($node_revision_fields['nid']);
+    // Unless a revision was specified, remove node_revision.uid.
+    if (!$vid) {
+      unset($node_revision_fields['uid']);
+    }
 
     // Change timestamp to revision_timestamp before adding it to the query.
     unset($node_revision_fields['timestamp']);
Index: modules/node/node.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.test,v
retrieving revision 1.38
diff -u -p -r1.38 node.test
--- modules/node/node.test	28 Jul 2009 19:18:06 -0000	1.38
+++ modules/node/node.test	16 Aug 2009 20:35:26 -0000
@@ -840,3 +840,50 @@ class NodeAccessRebuildTestCase extends 
     $this->assertText(t('Content permissions have been rebuilt.'));
   }
 }
+
+/**
+ * Ensure that new user does not overwrite original author
+ */
+class NodeEditBySecondUserTestCase extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Node edit integrity',
+      'description' => 'Ensures that a node edited by another user still retains the original author being displayed.',
+      'group' => 'Node',
+    );
+  }
+
+  function setUp() {
+
+  }
+  
+  function testNodeEditBySecondUser() {
+    // Create the two users and log in first user
+    $first_web_user = $this->drupalCreateUser(array('create page content', 'edit any page content'));
+    $second_web_user = $this->drupalCreateUser(array('create page content', 'edit any page content'));
+    $this->drupalLogin($first_web_user);
+
+    // Create node and logout
+    $content = array(
+      'type' => 'page',
+      'title' => $this->randomName(32),
+      'promote' => 1,
+    );
+    $node = $this->drupalCreateNode($content);
+    $this->assertIdentical($node->uid, $first_web_user->uid);
+    $nid = $node->nid;
+    $this->drupalLogout();
+    
+    // Log in as second user and edit same node.
+    $this->drupalLogin($second_web_user);
+    
+    $edit_path = "node/{$node->nid}/edit";
+    // Create node and logout
+    $content = array(
+      'title' => 'Second Title',
+    );
+    $this->drupalPost($edit_path, $content, t('Save'));
+    $node = node_load($node->nid);
+    $this->assertIdentical($node->uid, $first_web_user->uid);
+  }
+}
