Update to Drupal 8.1.1. For more information, see https://www.drupal.org/node/2718713
This commit is contained in:
parent
c0a0d5a94c
commit
9eae24d844
669 changed files with 3873 additions and 1553 deletions
|
@ -162,7 +162,7 @@ class CommentForm extends ContentEntityForm {
|
|||
'#maxlength' => 60,
|
||||
'#access' => $this->currentUser->isAnonymous() || $is_admin,
|
||||
'#size' => 30,
|
||||
'#attributes'=> [
|
||||
'#attributes' => [
|
||||
'data-drupal-default-value' => $config->get('anonymous'),
|
||||
],
|
||||
);
|
||||
|
|
|
@ -15,7 +15,7 @@ use Drupal\Core\Url;
|
|||
/**
|
||||
* Defines a class for building markup for comment links on a commented entity.
|
||||
*
|
||||
* Comment links include 'login to post new comment', 'add new comment' etc.
|
||||
* Comment links include 'log in to post new comment', 'add new comment' etc.
|
||||
*/
|
||||
class CommentLinkBuilder implements CommentLinkBuilderInterface {
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ use Drupal\Core\Entity\FieldableEntityInterface;
|
|||
/**
|
||||
* Defines an interface for building comment links on a commented entity.
|
||||
*
|
||||
* Comment links include 'login to post new comment', 'add new comment' etc.
|
||||
* Comment links include 'log in to post new comment', 'add new comment' etc.
|
||||
*/
|
||||
interface CommentLinkBuilderInterface {
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ class CommentStatistics implements CommentStatisticsInterface {
|
|||
*/
|
||||
public function read($entities, $entity_type, $accurate = TRUE) {
|
||||
$options = $accurate ? array() : array('target' => 'replica');
|
||||
$stats = $this->database->select('comment_entity_statistics', 'ces', $options)
|
||||
$stats = $this->database->select('comment_entity_statistics', 'ces', $options)
|
||||
->fields('ces')
|
||||
->condition('ces.entity_id', array_keys($entities), 'IN')
|
||||
->condition('ces.entity_type', $entity_type)
|
||||
|
|
|
@ -164,7 +164,7 @@ class CommentTypeForm extends EntityForm {
|
|||
else {
|
||||
$this->commentManager->addBodyField($comment_type->id());
|
||||
drupal_set_message(t('Comment type %label has been added.', array('%label' => $comment_type->label())));
|
||||
$this->logger->notice('Comment type %label has been added.', array('%label' => $comment_type->label(), 'link' => $edit_link));
|
||||
$this->logger->notice('Comment type %label has been added.', array('%label' => $comment_type->label(), 'link' => $edit_link));
|
||||
}
|
||||
|
||||
$form_state->setRedirectUrl($comment_type->urlInfo('collection'));
|
||||
|
|
|
@ -20,7 +20,7 @@ use Drupal\user\UserInterface;
|
|||
* @ContentEntityType(
|
||||
* id = "comment",
|
||||
* label = @Translation("Comment"),
|
||||
* bundle_label = @Translation("Content type"),
|
||||
* bundle_label = @Translation("Comment type"),
|
||||
* handlers = {
|
||||
* "storage" = "Drupal\comment\CommentStorage",
|
||||
* "storage_schema" = "Drupal\comment\CommentStorageSchema",
|
||||
|
|
|
@ -174,7 +174,7 @@ class CommentDefaultFormatter extends FormatterBase implements ContainerFactoryP
|
|||
// that page, we need to pass that subrequest route to our pager to
|
||||
// keep the pager working.
|
||||
$build['pager']['#route_name'] = $this->routeMatch->getRouteObject();
|
||||
$build['pager']['#route_parameters'] = $this->routeMatch->getRawParameters()->all();
|
||||
$build['pager']['#route_parameters'] = $this->routeMatch->getRawParameters()->all();
|
||||
if ($this->getSetting('pager_id')) {
|
||||
$build['pager']['#element'] = $this->getSetting('pager_id');
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ class Depth extends Field {
|
|||
foreach ($items as &$item) {
|
||||
// Work out the depth of this comment.
|
||||
$comment_thread = $item['rendered']['#markup'];
|
||||
$item['rendered']['#markup'] = count(explode('.', $comment_thread)) - 1;
|
||||
$item['rendered']['#markup'] = count(explode('.', $comment_thread)) - 1;
|
||||
}
|
||||
return $items;
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ class CommentAdminTest extends CommentTestBase {
|
|||
'skip comment approval',
|
||||
));
|
||||
|
||||
// Login as a web user.
|
||||
// Log in as a web user.
|
||||
$this->drupalLogin($this->webUser);
|
||||
// Post a comment.
|
||||
$comment = $this->postComment($this->node, $this->randomMachineName());
|
||||
|
@ -201,7 +201,7 @@ class CommentAdminTest extends CommentTestBase {
|
|||
$author_mail = $this->randomMachineName() . '@example.com';
|
||||
$anonymous_comment = $this->postComment($this->node, $this->randomMachineName(), $this->randomMachineName(), array('name' => $author_name, 'mail' => $author_mail));
|
||||
|
||||
// Login as an admin user.
|
||||
// Log in as an admin user.
|
||||
$this->drupalLogin($this->adminUser);
|
||||
|
||||
// Make sure the comment field is not visible when
|
||||
|
|
|
@ -173,7 +173,7 @@ class CommentAnonymousTest extends CommentTestBase {
|
|||
));
|
||||
$this->drupalGet('node/' . $this->node->id());
|
||||
$this->assertPattern('@<h2[^>]*>Comments</h2>@', 'Comments were displayed.');
|
||||
$this->assertLink('Log in', 1, 'Link to log in was found.');
|
||||
$this->assertLink('Log in', 1, 'Link to login was found.');
|
||||
$this->assertLink('register', 1, 'Link to register was found.');
|
||||
|
||||
user_role_change_permissions(RoleInterface::ANONYMOUS_ID, array(
|
||||
|
|
|
@ -82,7 +82,7 @@ class CommentCacheTagsTest extends EntityWithUriCacheTagsTestBase {
|
|||
'entity_id' => $this->entityTestCamelid->id(),
|
||||
'entity_type' => 'entity_test',
|
||||
'field_name' => 'comment',
|
||||
'status' => \Drupal\comment\CommentInterface::PUBLISHED,
|
||||
'status' => CommentInterface::PUBLISHED,
|
||||
));
|
||||
$comment->save();
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class CommentLanguageTest extends WebTestBase {
|
|||
|
||||
$this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
|
||||
|
||||
// Create and login user.
|
||||
// Create and log in user.
|
||||
$admin_user = $this->drupalCreateUser(array('administer site configuration', 'administer languages', 'access administration pages', 'administer content types', 'administer comments', 'create article content', 'access comments', 'post comments', 'skip comment approval'));
|
||||
$this->drupalLogin($admin_user);
|
||||
|
||||
|
|
|
@ -356,7 +356,7 @@ class CommentNonNodeTest extends WebTestBase {
|
|||
));
|
||||
$this->drupalGet('entity_test/' . $this->entity->id());
|
||||
$this->assertPattern('@<h2[^>]*>Comments</h2>@', 'Comments were displayed.');
|
||||
$this->assertLink('Log in', 0, 'Link to log in was found.');
|
||||
$this->assertLink('Log in', 0, 'Link to login was found.');
|
||||
$this->assertLink('register', 0, 'Link to register was found.');
|
||||
$this->assertNoFieldByName('subject[0][value]', '', 'Subject field not found.');
|
||||
$this->assertNoFieldByName('comment_body[0][value]', '', 'Comment field not found.');
|
||||
|
|
|
@ -35,7 +35,7 @@ class CommentPreviewTest extends CommentTestBase {
|
|||
$this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.');
|
||||
$this->drupalLogout();
|
||||
|
||||
// Login as web user.
|
||||
// Log in as web user.
|
||||
$this->drupalLogin($this->webUser);
|
||||
|
||||
// Test escaping of the username on the preview form.
|
||||
|
@ -86,7 +86,7 @@ class CommentPreviewTest extends CommentTestBase {
|
|||
$this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.');
|
||||
$this->drupalLogout();
|
||||
|
||||
// Login as web user.
|
||||
// Log in as web user.
|
||||
$this->drupalLogin($this->webUser);
|
||||
|
||||
// As the web user, fill in the comment form and preview the comment.
|
||||
|
|
|
@ -54,7 +54,7 @@ class CommentTypeTest extends CommentTestBase {
|
|||
$comment_type = CommentType::load('other');
|
||||
$this->assertTrue($comment_type, 'The new comment type has been created.');
|
||||
|
||||
// Login a test user.
|
||||
// Log in a test user.
|
||||
$this->drupalLogin($this->adminUser);
|
||||
|
||||
$this->drupalGet('admin/structure/comment/manage/' . $type->id());
|
||||
|
|
Reference in a new issue