Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / node / node.admin.inc
index b96ee5aff620d73ee277e464e414508a86798844..bd1b6232ad6ed68907ed3cc227db530dd57dc2c7 100644 (file)
@@ -35,7 +35,7 @@ function node_mass_update(array $nodes, array $updates, $langcode = NULL, $load
   if (count($nodes) > 10) {
     $batch = [
       'operations' => [
-        ['_node_mass_update_batch_process', [$nodes, $updates, $langcode, $load, $revisions]]
+        ['_node_mass_update_batch_process', [$nodes, $updates, $langcode, $load, $revisions]],
       ],
       'finished' => '_node_mass_update_batch_finished',
       'title' => t('Processing'),
@@ -60,7 +60,7 @@ function node_mass_update(array $nodes, array $updates, $langcode = NULL, $load
       }
       _node_mass_update_helper($node, $updates, $langcode);
     }
-    drupal_set_message(t('The update has been performed.'));
+    \Drupal::messenger()->addStatus(t('The update has been performed.'));
   }
 }
 
@@ -164,16 +164,16 @@ function _node_mass_update_batch_process(array $nodes, array $updates, $langcode
  */
 function _node_mass_update_batch_finished($success, $results, $operations) {
   if ($success) {
-    drupal_set_message(t('The update has been performed.'));
+    \Drupal::messenger()->addStatus(t('The update has been performed.'));
   }
   else {
-    drupal_set_message(t('An error occurred and processing did not complete.'), 'error');
+    \Drupal::messenger()->addError(t('An error occurred and processing did not complete.'));
     $message = \Drupal::translation()->formatPlural(count($results), '1 item successfully processed:', '@count items successfully processed:');
     $item_list = [
       '#theme' => 'item_list',
       '#items' => $results,
     ];
     $message .= \Drupal::service('renderer')->render($item_list);
-    drupal_set_message($message);
+    \Drupal::messenger()->addStatus($message);
   }
 }