diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/node/node.module | 4 | ||||
-rw-r--r-- | modules/node/node.test | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index af855d7ca..33910f6bc 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -976,8 +976,8 @@ function node_save($node) { unset($node->log); } - // When saving a new node revision, unset any existing revision ID so as to - // ensure that a new revision will actually be created, and store the old + // When saving a new node revision, unset any existing $node->vid so as to + // ensure that a new revision will actually be created, then store the old // revision ID in a separate property for use by node hook implementations. if (!$node->is_new && !empty($node->revision) && $node->vid) { $node->old_vid = $node->vid; diff --git a/modules/node/node.test b/modules/node/node.test index 7ec078d35..394f7e391 100644 --- a/modules/node/node.test +++ b/modules/node/node.test @@ -181,8 +181,7 @@ class NodeRevisionsTestCase extends DrupalWebTestCase { 'vid' => $node->vid, 'uid' => $node->uid, 'type' => $node->type, - 'title' => array(LANGUAGE_NONE => array(array('value' => $new_title))), - 'log' => '', + 'title' => $new_title, ); node_save($updated_node); $this->drupalGet('node/' . $node->nid); @@ -201,14 +200,14 @@ class NodeRevisionsTestCase extends DrupalWebTestCase { 'vid' => $node->vid, 'uid' => $node->uid, 'type' => $node->type, - 'title' => array(LANGUAGE_NONE => array(array('value' => $new_title))), + 'title' => $new_title, 'revision' => 1, ); node_save($updated_node); $this->drupalGet('node/' . $node->nid); - $this->assertText($new_title, t('New node title appears on the page.')); + $this->assertText($new_title, 'New node title appears on the page.'); $node_revision = node_load($node->nid, NULL, TRUE); - $this->assertTrue(empty($node_revision->log), t('After a new node revision is saved with an empty log message, the log message for the node is empty.')); + $this->assertTrue(empty($node_revision->log), 'After a new node revision is saved with an empty log message, the log message for the node is empty.'); } } |