From 9d638eb177e41410a411b6143ffdda7e181753f1 Mon Sep 17 00:00:00 2001 From: Angie Byron <webchick@24967.no-reply.drupal.org> Date: Thu, 30 Dec 2010 03:47:36 +0000 Subject: [PATCH] #1003958 by mlncn: Correct _node_save_revision documentation --- modules/node/node.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/node/node.module b/modules/node/node.module index 4a0ab7b450cf..b238c9e8562d 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1159,8 +1159,7 @@ function node_save($node) { /** * Helper function to save a revision with the uid of the current user. * - * Node is taken by reference, because drupal_write_record() updates the - * $node with the revision id, and we need to pass that back to the caller. + * The resulting revision ID is available afterward in $node->vid. */ function _node_save_revision($node, $uid, $update = NULL) { $temp_uid = $node->uid; @@ -1171,6 +1170,7 @@ function _node_save_revision($node, $uid, $update = NULL) { else { drupal_write_record('node_revision', $node); } + // Have node object still show node owner's uid, not revision author's. $node->uid = $temp_uid; } -- GitLab