Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / book / book.module
index 4c62274271db92fb9b89c41a382089c21801aee0..b5d5515969f01cff45d4e40dbd86e2deb2c5a449 100644 (file)
@@ -111,7 +111,7 @@ function book_node_links_alter(array &$links, NodeInterface $node, array &$conte
               'type' => 'html',
               'node' => $node->id(),
             ]),
-            'attributes' => ['title' => t('Show a printer-friendly version of this book page and its sub-pages.')]
+            'attributes' => ['title' => t('Show a printer-friendly version of this book page and its sub-pages.')],
           ];
         }
       }
@@ -539,3 +539,16 @@ function book_node_type_update(NodeTypeInterface $type) {
     $config->save();
   }
 }
+
+/**
+ * Implements hook_migration_plugins_alter().
+ */
+function book_migration_plugins_alter(array &$migrations) {
+  // Book settings are migrated identically for Drupal 6 and Drupal 7. However,
+  // a d6_book_settings migration already existed before the consolidated
+  // book_settings migration existed, so to maintain backwards compatibility,
+  // ensure that d6_book_settings is an alias of book_settings.
+  if (isset($migrations['book_settings'])) {
+    $migrations['d6_book_settings'] = &$migrations['book_settings'];
+  }
+}