Update to Drupal 8.1.5. For more information, see https://www.drupal.org/project/drupal/releases/8.1.5
This commit is contained in:
parent
13b6ca7cc2
commit
38ba7c357d
342 changed files with 7814 additions and 1534 deletions
|
@ -463,14 +463,11 @@ function node_revision_load($vid = NULL) {
|
|||
/**
|
||||
* Deletes a node revision.
|
||||
*
|
||||
* @param $revision_id
|
||||
* @param int $revision_id
|
||||
* The revision ID to delete.
|
||||
*
|
||||
* @return bool
|
||||
* TRUE if the revision deletion was successful; otherwise, FALSE.
|
||||
*/
|
||||
function node_revision_delete($revision_id) {
|
||||
entity_revision_delete('node', $revision_id);
|
||||
\Drupal::entityTypeManager()->getStorage('node')->deleteRevision($revision_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1081,8 +1078,9 @@ function node_query_node_access_alter(AlterableInterface $query) {
|
|||
|
||||
// Bubble the 'user.node_grants:$op' cache context to the current render
|
||||
// context.
|
||||
$request = \Drupal::requestStack()->getCurrentRequest();
|
||||
$renderer = \Drupal::service('renderer');
|
||||
if ($renderer->hasRenderContext()) {
|
||||
if ($request->isMethodSafe() && $renderer->hasRenderContext()) {
|
||||
$build = ['#cache' => ['contexts' => ['user.node_grants:' . $op]]];
|
||||
$renderer->render($build);
|
||||
}
|
||||
|
|
Reference in a new issue