upgrades core to 8.4.2

This commit is contained in:
Bachir Soussi Chiadmi
2017-11-14 16:09:54 +01:00
parent bd60eff9b3
commit c2b4e25be4
3504 changed files with 140306 additions and 38684 deletions
+15 -3
View File
@@ -34,6 +34,8 @@ use Drupal\node\NodeTypeInterface;
*
* @deprecated Scheduled for removal in Drupal 9.0.x.
* Use \Drupal\node\NodeInterface::NOT_PUBLISHED instead.
*
* @see https://www.drupal.org/node/2316145
*/
const NODE_NOT_PUBLISHED = 0;
@@ -42,6 +44,8 @@ const NODE_NOT_PUBLISHED = 0;
*
* @deprecated Scheduled for removal in Drupal 9.0.x.
* Use \Drupal\node\NodeInterface::PUBLISHED instead.
*
* @see https://www.drupal.org/node/2316145
*/
const NODE_PUBLISHED = 1;
@@ -50,6 +54,8 @@ const NODE_PUBLISHED = 1;
*
* @deprecated Scheduled for removal in Drupal 9.0.x.
* Use \Drupal\node\NodeInterface::NOT_PROMOTED instead.
*
* @see https://www.drupal.org/node/2316145
*/
const NODE_NOT_PROMOTED = 0;
@@ -58,6 +64,8 @@ const NODE_NOT_PROMOTED = 0;
*
* @deprecated Scheduled for removal in Drupal 9.0.x.
* Use \Drupal\node\NodeInterface::PROMOTED instead.
*
* @see https://www.drupal.org/node/2316145
*/
const NODE_PROMOTED = 1;
@@ -66,6 +74,8 @@ const NODE_PROMOTED = 1;
*
* @deprecated Scheduled for removal in Drupal 9.0.x.
* Use \Drupal\node\NodeInterface::NOT_STICKY instead.
*
* @see https://www.drupal.org/node/2316145
*/
const NODE_NOT_STICKY = 0;
@@ -74,6 +84,8 @@ const NODE_NOT_STICKY = 0;
*
* @deprecated Scheduled for removal in Drupal 9.0.x.
* Use \Drupal\node\NodeInterface::STICKY instead.
*
* @see https://www.drupal.org/node/2316145
*/
const NODE_STICKY = 1;
@@ -593,9 +605,9 @@ function template_preprocess_node(&$variables) {
$variables['node'] = $variables['elements']['#node'];
/** @var \Drupal\node\NodeInterface $node */
$node = $variables['node'];
$variables['date'] = drupal_render($variables['elements']['created']);
$variables['date'] = \Drupal::service('renderer')->render($variables['elements']['created']);
unset($variables['elements']['created']);
$variables['author_name'] = drupal_render($variables['elements']['uid']);
$variables['author_name'] = \Drupal::service('renderer')->render($variables['elements']['uid']);
unset($variables['elements']['uid']);
$variables['url'] = $node->url('canonical', [
@@ -1099,7 +1111,7 @@ function node_query_node_access_alter(AlterableInterface $query) {
// context.
$request = \Drupal::requestStack()->getCurrentRequest();
$renderer = \Drupal::service('renderer');
if ($request->isMethodSafe() && $renderer->hasRenderContext()) {
if ($request->isMethodCacheable() && $renderer->hasRenderContext()) {
$build = ['#cache' => ['contexts' => ['user.node_grants:' . $op]]];
$renderer->render($build);
}