Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes

This commit is contained in:
Pantheon Automation 2016-04-20 09:56:34 -07:00 committed by Greg Anderson
parent b11a755ba8
commit c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\comment\Controller\AdminController.
*/
namespace Drupal\comment\Controller;
use Drupal\Core\Controller\ControllerBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\comment\Controller\CommentController.
*/
namespace Drupal\comment\Controller;
use Drupal\comment\CommentInterface;
@ -137,7 +132,6 @@ class CommentController extends ControllerBase {
if ($session = $request->getSession()) {
$redirect_request->setSession($session);
}
// @todo: Convert the pager to use the request object.
$request->query->set('page', $page);
$response = $this->httpKernel->handle($redirect_request, HttpKernelInterface::SUB_REQUEST);
if ($response instanceof CacheableResponseInterface) {
@ -289,7 +283,7 @@ class CommentController extends ControllerBase {
$status = $entity->{$field_name}->status;
$access = $access->andIf(AccessResult::allowedIf($status == CommentItemInterface::OPEN)
->cacheUntilEntityChanges($entity));
->addCacheableDependency($entity));
// $pid indicates that this is a reply to a comment.
if ($pid) {
@ -301,7 +295,7 @@ class CommentController extends ControllerBase {
// Check if the parent comment is published and belongs to the entity.
$access = $access->andIf(AccessResult::allowedIf($comment && $comment->isPublished() && $comment->getCommentedEntityId() == $entity->id()));
if ($comment) {
$access->cacheUntilEntityChanges($comment);
$access->addCacheableDependency($comment);
}
}
return $access;