From 6eff7f728bd46cb811f4e70098e8e31f4b26f99f Mon Sep 17 00:00:00 2001
From: bcweaver <brianweaver@gmail.com>
Date: Tue, 14 May 2019 13:33:37 -0400
Subject: [PATCH] Update views_bulk_operations:  2.4 --> 2.5

---
 composer.json                                 |  2 +-
 composer.lock                                 | 20 +++++++++----------
 vendor/composer/installed.json                | 18 ++++++++---------
 .../views_bulk_operations.views.schema.yml    |  3 +++
 .../actions_permissions.info.yml              |  6 +++---
 .../views_bulk_operations_example.info.yml    |  6 +++---
 .../ViewsBulkOperationsController.php         |  8 +++++++-
 .../field/ViewsBulkOperationsBulkForm.php     | 17 +++++++++++++---
 .../views_bulk_operations_test.info.yml       |  6 +++---
 .../views_bulk_operations.info.yml            |  6 +++---
 10 files changed, 56 insertions(+), 36 deletions(-)

diff --git a/composer.json b/composer.json
index f57f2699fe..e05681a795 100644
--- a/composer.json
+++ b/composer.json
@@ -176,7 +176,7 @@
         "drupal/views_ajax_history": "^1.0",
         "drupal/views_autocomplete_filters": "1.1",
         "drupal/views_bootstrap": "3.1",
-        "drupal/views_bulk_operations": "2.4",
+        "drupal/views_bulk_operations": "^2.4",
         "drupal/views_fieldsets": "3.3",
         "drupal/views_infinite_scroll": "1.5",
         "drupal/views_slideshow": "4.4",
diff --git a/composer.lock b/composer.lock
index f45e7dd02c..3179968f35 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "content-hash": "9209cfef35560e6dc1d5331eca620358",
+    "content-hash": "f8e1f9c6a81412f0164d33bfbc631031",
     "packages": [
         {
             "name": "alchemy/zippy",
@@ -3754,7 +3754,7 @@
                 },
                 "patches_applied": {
                     "2881745": "patches/entity_embed_2881745-22.patch",
-                    "2511404": "https://www.drupal.org/files/issues/2018-09-17/entity-embed-link-2511404-68.patch"
+                    "2511404": "patches/entity-embed-img-link-2511404-68.patch"
                 }
             },
             "notification-url": "https://packages.drupal.org/8/downloads",
@@ -7082,17 +7082,17 @@
         },
         {
             "name": "drupal/views_bulk_operations",
-            "version": "2.4.0",
+            "version": "2.5.0",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/views_bulk_operations.git",
-                "reference": "8.x-2.4"
+                "reference": "8.x-2.5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/views_bulk_operations-8.x-2.4.zip",
-                "reference": "8.x-2.4",
-                "shasum": "50c5778770f3a92e38ecf664301b77146e3cc931"
+                "url": "https://ftp.drupal.org/files/projects/views_bulk_operations-8.x-2.5.zip",
+                "reference": "8.x-2.5",
+                "shasum": "3ec848b4f235720d05cb9713ea80a86415b6909f"
             },
             "require": {
                 "drupal/core": "^8.4"
@@ -7103,8 +7103,8 @@
                     "dev-2.x": "2.x-dev"
                 },
                 "drupal": {
-                    "version": "8.x-2.4",
-                    "datestamp": "1530516821",
+                    "version": "8.x-2.5",
+                    "datestamp": "1550740384",
                     "security-coverage": {
                         "status": "covered",
                         "message": "Covered by Drupal's security advisory policy"
@@ -7145,7 +7145,7 @@
             "description": "Adds an ability to perform bulk operations on selected entities from view results. Provides an API to create such operations.",
             "homepage": "https://www.drupal.org/project/views_bulk_operations",
             "support": {
-                "source": "http://cgit.drupalcode.org/views_bulk_operations",
+                "source": "https://git.drupalcode.org/project/views_bulk_operations",
                 "issues": "https://www.drupal.org/project/issues/views_bulk_operations?version=8.x",
                 "docs": "https://www.drupal.org/docs/8/modules/views-bulk-operations-vbo"
             }
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index e4c2e2ded3..030b9e5f1b 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -7309,18 +7309,18 @@
     },
     {
         "name": "drupal/views_bulk_operations",
-        "version": "2.4.0",
-        "version_normalized": "2.4.0.0",
+        "version": "2.5.0",
+        "version_normalized": "2.5.0.0",
         "source": {
             "type": "git",
             "url": "https://git.drupalcode.org/project/views_bulk_operations.git",
-            "reference": "8.x-2.4"
+            "reference": "8.x-2.5"
         },
         "dist": {
             "type": "zip",
-            "url": "https://ftp.drupal.org/files/projects/views_bulk_operations-8.x-2.4.zip",
-            "reference": "8.x-2.4",
-            "shasum": "50c5778770f3a92e38ecf664301b77146e3cc931"
+            "url": "https://ftp.drupal.org/files/projects/views_bulk_operations-8.x-2.5.zip",
+            "reference": "8.x-2.5",
+            "shasum": "3ec848b4f235720d05cb9713ea80a86415b6909f"
         },
         "require": {
             "drupal/core": "^8.4"
@@ -7331,8 +7331,8 @@
                 "dev-2.x": "2.x-dev"
             },
             "drupal": {
-                "version": "8.x-2.4",
-                "datestamp": "1530516821",
+                "version": "8.x-2.5",
+                "datestamp": "1550740384",
                 "security-coverage": {
                     "status": "covered",
                     "message": "Covered by Drupal's security advisory policy"
@@ -7374,7 +7374,7 @@
         "description": "Adds an ability to perform bulk operations on selected entities from view results. Provides an API to create such operations.",
         "homepage": "https://www.drupal.org/project/views_bulk_operations",
         "support": {
-            "source": "http://cgit.drupalcode.org/views_bulk_operations",
+            "source": "https://git.drupalcode.org/project/views_bulk_operations",
             "issues": "https://www.drupal.org/project/issues/views_bulk_operations?version=8.x",
             "docs": "https://www.drupal.org/docs/8/modules/views-bulk-operations-vbo"
         }
diff --git a/web/modules/views_bulk_operations/config/schema/views_bulk_operations.views.schema.yml b/web/modules/views_bulk_operations/config/schema/views_bulk_operations.views.schema.yml
index 546ae53e55..0fae1cbc73 100644
--- a/web/modules/views_bulk_operations/config/schema/views_bulk_operations.views.schema.yml
+++ b/web/modules/views_bulk_operations/config/schema/views_bulk_operations.views.schema.yml
@@ -23,3 +23,6 @@ views.field.views_bulk_operations_bulk_form:
     preconfiguration:
       type: ignore
       label: 'Preliminary configuration array'
+    clear_on_exposed:
+      type: boolean
+      label: 'Clear on exposed'
diff --git a/web/modules/views_bulk_operations/modules/actions_permissions/actions_permissions.info.yml b/web/modules/views_bulk_operations/modules/actions_permissions/actions_permissions.info.yml
index 562a3de87a..06947af3dd 100644
--- a/web/modules/views_bulk_operations/modules/actions_permissions/actions_permissions.info.yml
+++ b/web/modules/views_bulk_operations/modules/actions_permissions/actions_permissions.info.yml
@@ -6,8 +6,8 @@ package: 'Views Bulk Operations'
 dependencies:
   - drupal:views_bulk_operations
 
-# Information added by Drupal.org packaging script on 2018-07-02
-version: '8.x-2.4'
+# Information added by Drupal.org packaging script on 2019-02-21
+version: '8.x-2.5'
 core: '8.x'
 project: 'views_bulk_operations'
-datestamp: 1530516826
+datestamp: 1550740388
diff --git a/web/modules/views_bulk_operations/modules/views_bulk_operations_example/views_bulk_operations_example.info.yml b/web/modules/views_bulk_operations/modules/views_bulk_operations_example/views_bulk_operations_example.info.yml
index 4eff3573ec..c8c57af493 100644
--- a/web/modules/views_bulk_operations/modules/views_bulk_operations_example/views_bulk_operations_example.info.yml
+++ b/web/modules/views_bulk_operations/modules/views_bulk_operations_example/views_bulk_operations_example.info.yml
@@ -6,8 +6,8 @@ package: 'Examples'
 dependencies:
   - drupal:views_bulk_operations
 
-# Information added by Drupal.org packaging script on 2018-07-02
-version: '8.x-2.4'
+# Information added by Drupal.org packaging script on 2019-02-21
+version: '8.x-2.5'
 core: '8.x'
 project: 'views_bulk_operations'
-datestamp: 1530516826
+datestamp: 1550740388
diff --git a/web/modules/views_bulk_operations/src/Controller/ViewsBulkOperationsController.php b/web/modules/views_bulk_operations/src/Controller/ViewsBulkOperationsController.php
index 3908916dda..8f87b06298 100644
--- a/web/modules/views_bulk_operations/src/Controller/ViewsBulkOperationsController.php
+++ b/web/modules/views_bulk_operations/src/Controller/ViewsBulkOperationsController.php
@@ -9,6 +9,7 @@
 use Drupal\views_bulk_operations\Service\ViewsBulkOperationsActionProcessorInterface;
 use Drupal\user\PrivateTempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\HttpFoundation\RedirectResponse;
 use Symfony\Component\HttpFoundation\Request;
 use Drupal\Core\Ajax\AjaxResponse;
 
@@ -75,7 +76,12 @@ public function execute($view_id, $display_id) {
     $this->deleteTempstoreData();
 
     $this->actionProcessor->executeProcessing($view_data);
-    return batch_process($view_data['redirect_url']);
+    if ($view_data['batch']) {
+      return batch_process($view_data['redirect_url']);
+    }
+    else {
+      return new RedirectResponse($view_data['redirect_url']->setAbsolute()->toString());
+    }
   }
 
   /**
diff --git a/web/modules/views_bulk_operations/src/Plugin/views/field/ViewsBulkOperationsBulkForm.php b/web/modules/views_bulk_operations/src/Plugin/views/field/ViewsBulkOperationsBulkForm.php
index 66d893f3c6..13087d299e 100644
--- a/web/modules/views_bulk_operations/src/Plugin/views/field/ViewsBulkOperationsBulkForm.php
+++ b/web/modules/views_bulk_operations/src/Plugin/views/field/ViewsBulkOperationsBulkForm.php
@@ -215,6 +215,12 @@ protected function updateTempstoreData() {
       'redirect_url' => Url::createFromRequest(clone $this->requestStack->getCurrentRequest()),
       'exposed_input' => $this->view->getExposedInput(),
     ];
+    $query = $variable['redirect_url']->getOption('query');
+    if (!$query) {
+      $query = [];
+    }
+    $query += $variable['exposed_input'];
+    $variable['redirect_url']->setOption('query', $query);
 
     // Create tempstore data object if it doesn't exist.
     if (!is_array($this->tempStoreData)) {
@@ -624,7 +630,7 @@ public function viewsForm(array &$form, FormStateInterface $form_state) {
         $action_id = $form_state->getValue('action');
         if (!empty($action_id)) {
           $action = $this->actions[$action_id];
-          if ($this->isConfigurable($action)) {
+          if ($this->isActionConfigurable($action)) {
             $actionObject = $this->actionManager->createInstance($action_id);
             $form['header'][$this->options['id']]['configuration'] += $actionObject->buildConfigurationForm($form['header'][$this->options['id']]['configuration'], $form_state);
             $form['header'][$this->options['id']]['configuration']['#config_included'] = TRUE;
@@ -778,7 +784,7 @@ public function viewsFormSubmit(array &$form, FormStateInterface $form_state) {
         $this->tempStoreData['list'] = [];
       }
 
-      $configurable = $this->isConfigurable($action);
+      $configurable = $this->isActionConfigurable($action);
 
       // Get configuration if using AJAX.
       if ($configurable && empty($this->options['form_step'])) {
@@ -794,6 +800,11 @@ public function viewsFormSubmit(array &$form, FormStateInterface $form_state) {
       }
 
       // Routing - determine redirect route.
+
+      // Set default redirection due to issue #2952498.
+      // TODO: remove the next line when core cause is eliminated.
+      $redirect_route = 'views_bulk_operations.execute_batch';
+
       if ($this->options['form_step'] && $configurable) {
         $redirect_route = 'views_bulk_operations.execute_configurable';
       }
@@ -887,7 +898,7 @@ public function clickSortable() {
   /**
    * Check if an action is configurable.
    */
-  protected function isConfigurable($action) {
+  protected function isActionConfigurable($action) {
     return (in_array('Drupal\Core\Plugin\PluginFormInterface', class_implements($action['class']), TRUE) || method_exists($action['class'], 'buildConfigurationForm'));
   }
 
diff --git a/web/modules/views_bulk_operations/tests/views_bulk_operations_test/views_bulk_operations_test.info.yml b/web/modules/views_bulk_operations/tests/views_bulk_operations_test/views_bulk_operations_test.info.yml
index b990f79660..a8b750f94a 100644
--- a/web/modules/views_bulk_operations/tests/views_bulk_operations_test/views_bulk_operations_test.info.yml
+++ b/web/modules/views_bulk_operations/tests/views_bulk_operations_test/views_bulk_operations_test.info.yml
@@ -7,8 +7,8 @@ dependencies:
   - drupal:views_bulk_operations
   - drupal:node
 
-# Information added by Drupal.org packaging script on 2018-07-02
-version: '8.x-2.4'
+# Information added by Drupal.org packaging script on 2019-02-21
+version: '8.x-2.5'
 core: '8.x'
 project: 'views_bulk_operations'
-datestamp: 1530516826
+datestamp: 1550740388
diff --git a/web/modules/views_bulk_operations/views_bulk_operations.info.yml b/web/modules/views_bulk_operations/views_bulk_operations.info.yml
index f78de2e727..06015357a1 100644
--- a/web/modules/views_bulk_operations/views_bulk_operations.info.yml
+++ b/web/modules/views_bulk_operations/views_bulk_operations.info.yml
@@ -6,8 +6,8 @@ package: 'Views'
 dependencies:
   - drupal:views (>=8.4)
 
-# Information added by Drupal.org packaging script on 2018-07-02
-version: '8.x-2.4'
+# Information added by Drupal.org packaging script on 2019-02-21
+version: '8.x-2.5'
 core: '8.x'
 project: 'views_bulk_operations'
-datestamp: 1530516826
+datestamp: 1550740388
-- 
GitLab