diff --git a/core/modules/comment/comment.install b/core/modules/comment/comment.install index db4a047..bf95de6 100644 --- a/core/modules/comment/comment.install +++ b/core/modules/comment/comment.install @@ -453,6 +453,7 @@ function comment_update_8003(&$sandbox) { function comment_update_8004() { update_variables_to_state(array( 'node_cron_comments_scale' => 'comment.node_comment_statistics_scale', + 'comment_maintain_node_statistics' => 'comment.maintain_entity_statistics', )); } diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index d054cdd..026612a 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1473,7 +1473,7 @@ function comment_get_display_ordinal($cid, $instance) { if ($mode == COMMENT_MODE_FLAT) { // For flat comments, cid is used for ordering comments due to - // unpredicatable behavior with timestamp, so we make the same assumption + // unpredictable behavior with timestamp, so we make the same assumption // here. $query->condition('c1.cid', $cid, '<'); } diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php index 33defd5..39edaa2 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentInterfaceTest.php @@ -136,21 +136,21 @@ function testCommentInterface() { $this->assertText(t('The comment you are replying to does not exist.'), 'Replying to an unpublished comment'); // Attempt to post to node with comments disabled. - $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => array(LANGUAGE_NOT_SPECIFIED => array(array('status' => COMMENT_HIDDEN))))); + $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => array(array('status' => COMMENT_HIDDEN)))); $this->assertTrue($this->node, 'Article node created.'); $this->drupalGet('comment/reply/node/' . $this->node->nid . '/comment'); $this->assertText('This discussion is closed', 'Posting to node with comments disabled'); $this->assertNoField('edit-comment', 'Comment body field found.'); // Attempt to post to node with read-only comments. - $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => array(LANGUAGE_NOT_SPECIFIED => array(array('status' => COMMENT_CLOSED))))); + $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => array(array('status' => COMMENT_CLOSED)))); $this->assertTrue($this->node, 'Article node created.'); $this->drupalGet('comment/reply/node/' . $this->node->nid . '/comment'); $this->assertText('This discussion is closed', 'Posting to node with comments read-only'); $this->assertNoField('edit-comment', 'Comment body field found.'); // Attempt to post to node with comments enabled (check field names etc). - $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => array(LANGUAGE_NOT_SPECIFIED => array(array('status' => COMMENT_OPEN))))); + $this->node = $this->drupalCreateNode(array('type' => 'article', 'promote' => 1, 'comment' => array(array('status' => COMMENT_OPEN)))); $this->assertTrue($this->node, 'Article node created.'); $this->drupalGet('comment/reply/node/' . $this->node->nid . '/comment'); $this->assertNoText('This discussion is closed', 'Posting to node with comments enabled'); diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.php index 55e3321..f06d29c 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.php @@ -92,9 +92,9 @@ protected function createEntity($values, $langcode, $bundle_name = 'comment_arti } $node = $this->drupalCreateNode(array( 'type' => $node_type, - $field_name => array(LANGUAGE_NOT_SPECIFIED => array( + $field_name => array( array('status' => COMMENT_OPEN) - )), + ), )); $values['entity_id'] = $node->nid; $values['entity_type'] = 'node'; diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php index 11d2c10..1245313 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -240,9 +240,9 @@ protected function drupalCreateNode(array $settings = array()) { // Add in comment settings for nodes. if (module_exists('comment')) { $settings += array( - 'comment' => array(LANGUAGE_NOT_SPECIFIED => array( + 'comment' => array( array('status' => COMMENT_OPEN) - )), + ), ); }