Skip to content

Instantly share code, notes, and snippets.

View damiankloip's full-sized avatar

Damian Lee damiankloip

View GitHub Profile
// Add missing arguments not defined in the path, but added as handler.
while (($total_arguments - $arg_counter) > 0) {
$arg_id = 'arg_' . $arg_counter++;
$bit = '{' . $arg_id . '}';
// In contrast to the previous loop add the defaults here, as % was not
// specified, which means the argument is optional.
$defaults[$arg_id] = NULL;
$bits[] = $bit;
}
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/QueryParameter.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/QueryParameter.php
new file mode 100644
index 0000000..551d827
--- /dev/null
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/QueryParameter.php
@@ -0,0 +1,82 @@
+<?php
+
+/**
+ * @file
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 5c85622..abab13a 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -408,6 +408,11 @@ function drupal_settings_initialize() {
if (is_readable(DRUPAL_ROOT . '/' . $conf_path . '/settings.php')) {
require DRUPAL_ROOT . '/' . $conf_path . '/settings.php';
}
+
+ // Manually include Settings so we do not need to go to the file system
diff --git a/core/lib/Drupal/Core/Access/CsrfTokenGenerator.php b/core/lib/Drupal/Core/Access/CsrfTokenGenerator.php
index 37a141f..c260a31 100644
--- a/core/lib/Drupal/Core/Access/CsrfTokenGenerator.php
+++ b/core/lib/Drupal/Core/Access/CsrfTokenGenerator.php
@@ -20,18 +20,18 @@
class CsrfTokenGenerator {
/**
- * The private key service.
+ * The private key.
diff --git a/core/core.services.yml b/core/core.services.yml
index 9b9c80b..0bea639 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -299,6 +299,8 @@ services:
arguments: ['@serialization.phpserialize', '@database', '@lock']
router.request_context:
class: Symfony\Component\Routing\RequestContext
+ calls:
+ - [fromRequest, ['@?request']]
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc
index d01235d..11554d5 100644
--- a/core/modules/views/views.theme.inc
+++ b/core/modules/views/views.theme.inc
@@ -617,10 +617,6 @@ function template_preprocess_views_view_table(&$variables) {
$column_reference['attributes']['class'][] = 'views-field-' . $variables['fields'][$field];
}
- if ($classes = $fields[$field]->elementClasses($num)) {
- $column_reference['attributes']['class'][] = $classes;
--- a/core/lib/Drupal/Core/Http/Client.php
+++ b/core/lib/Drupal/Core/Http/Client.php
@@ -20,28 +20,27 @@ class Client extends GuzzleClient {
* {@inheritdoc}
*/
public function __construct(array $config = []) {
- $defaults = array(
+ $default_config = array(
'config' => array(
'curl' => array(
/**
* Get an array of default options to apply to the client
*
* @return array
*/
protected function getDefaultOptions()
{
$settings = [
'allow_redirects' => true,
'exceptions' => true,
diff --git a/core/modules/views/lib/Drupal/views/ViewsData.php b/core/modules/views/lib/Drupal/views/ViewsData.php
index a1e2da4..a2a7d29 100644
--- a/core/modules/views/lib/Drupal/views/ViewsData.php
+++ b/core/modules/views/lib/Drupal/views/ViewsData.php
@@ -38,13 +38,20 @@ class ViewsData {
protected $cacheBackend;
/**
- * Storage for the data itself.
+ * Table data storage.
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
index bc99b02..2d47e76 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
@@ -2130,11 +2130,59 @@ public function executeHookMenuLinkDefaults(array &$existing_links) {
* Render this display.
*/
public function render() {
+ $view_id = $this->view->storage->id();
$element = array(