X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fviews%2Fviews.post_update.php;fp=web%2Fcore%2Fmodules%2Fviews%2Fviews.post_update.php;h=b77d5ceb7af9638cc5a374ce1c386626a3929d09;hp=a278034c8a77285339daccecbcda8389c5bdd196;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/views/views.post_update.php b/web/core/modules/views/views.post_update.php index a278034c8..b77d5ceb7 100644 --- a/web/core/modules/views/views.post_update.php +++ b/web/core/modules/views/views.post_update.php @@ -128,7 +128,7 @@ function views_post_update_cleanup_duplicate_views_data() { */ function views_post_update_field_formatter_dependencies() { $views = View::loadMultiple(); - array_walk($views, function(View $view) { + array_walk($views, function (View $view) { $view->save(); }); } @@ -138,7 +138,7 @@ function views_post_update_field_formatter_dependencies() { */ function views_post_update_taxonomy_index_tid() { $views = View::loadMultiple(); - array_walk($views, function(View $view) { + array_walk($views, function (View $view) { $old_dependencies = $view->getDependencies(); $new_dependencies = $view->calculateDependencies()->getDependencies(); if ($old_dependencies !== $new_dependencies) { @@ -152,7 +152,7 @@ function views_post_update_taxonomy_index_tid() { */ function views_post_update_serializer_dependencies() { $views = View::loadMultiple(); - array_walk($views, function(View $view) { + array_walk($views, function (View $view) { $old_dependencies = $view->getDependencies(); $new_dependencies = $view->calculateDependencies()->getDependencies(); if ($old_dependencies !== $new_dependencies) { @@ -201,3 +201,15 @@ function views_post_update_boolean_filter_values() { function views_post_update_grouped_filters() { // Empty update to cause a cache rebuild so that the schema changes are read. } + +/** + * Fix table names for revision metadata fields. + */ +function views_post_update_revision_metadata_fields() { + // The table names are fixed automatically in + // \Drupal\views\Entity\View::preSave(), so we just need to re-save all views. + $views = View::loadMultiple(); + array_walk($views, function (View $view) { + $view->save(); + }); +}