summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index cb4c1cfe9..77ffeec77 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -837,9 +837,12 @@ function node_save(&$node) {
/**
- * Helper function to save a revision with current user responsible for revision.
+ * Helper function to save a revision with the uid of the current user.
+ *
+ * Node is taken by reference, becuse drupal_write_record() updates the
+ * $node with the revision id, and we need to pass that back to the caller.
*/
-function _node_save_revision($node, $uid, $update = NULL) {
+function _node_save_revision(&$node, $uid, $update = NULL) {
$temp_uid = $node->uid;
$node->uid = $uid;
if (isset($update)) {