summaryrefslogtreecommitdiff
path: root/modules/node
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-10-01 22:03:29 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-10-01 22:03:29 +0000
commit3858e1a19f9b8331d01cc7ab45d28b5575c0e260 (patch)
treec55ae9c4a8216b8ecade83c7b5328cf1ee9d2c7d /modules/node
parent7f5caaacdca6de4876ee876a9d1de5ce97ea0c93 (diff)
downloadbrdo-3858e1a19f9b8331d01cc7ab45d28b5575c0e260.tar.gz
brdo-3858e1a19f9b8331d01cc7ab45d28b5575c0e260.tar.bz2
#926794 by ksenzee, moshe weitzman, Jody Lynn: Fixed revisions of unpublished nodes lose their body field on upgrade.
Diffstat (limited to 'modules/node')
-rw-r--r--modules/node/node.install6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/node/node.install b/modules/node/node.install
index 56af7bce3..5f93db2e8 100644
--- a/modules/node/node.install
+++ b/modules/node/node.install
@@ -598,7 +598,7 @@ function node_update_7006(&$sandbox) {
$sandbox['count'] = 0;
$query = db_select('node', 'n');
- $query->join('node_revision', 'nr', 'n.vid = nr.vid');
+ $query->join('node_revision', 'nr', 'n.nid = nr.nid');
$sandbox['total'] = $query->countQuery()->execute()->fetchField();
$sandbox['body_field_id'] = $body_field['id'];
@@ -611,7 +611,7 @@ function node_update_7006(&$sandbox) {
// Operate on every revision of every node (whee!), in batches.
$batch_size = 200;
$query = db_select('node_revision', 'nr');
- $query->innerJoin('node', 'n', 'n.vid = nr.vid');
+ $query->innerJoin('node', 'n', 'n.nid = nr.nid');
$query
->fields('nr', array('nid', 'vid', 'body', 'teaser', 'format'))
->fields('n', array('type', 'status', 'comment', 'promote', 'sticky', 'language'))
@@ -620,7 +620,7 @@ function node_update_7006(&$sandbox) {
->range(0, $batch_size);
$revisions = $query->execute();
- // Load each reversion of each node, set up 'body'
+ // Load each revision of each node, set up 'body'
// appropriately, and save the node's field data. Note that
// node_load() will not return the body or teaser values from
// {node_revision} because those columns have been removed from the