diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-11-20 09:47:07 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-11-20 09:47:07 +0000 |
commit | 135f366c2b3a034846690a1038283464cd07ca82 (patch) | |
tree | 95b2ca0c161f009126fee2bbbff794b350ddbd8b /modules/node | |
parent | 0afbb703682daac02dfda3b26ccd65916241ce78 (diff) | |
download | brdo-135f366c2b3a034846690a1038283464cd07ca82.tar.gz brdo-135f366c2b3a034846690a1038283464cd07ca82.tar.bz2 |
#193064 patch by myself: take node by reference, when revisionn is saved, so we get the vid property updated on PHP 4 too
Diffstat (limited to 'modules/node')
-rw-r--r-- | modules/node/node.module | 7 |
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)) { |