Mercurial > hg > isophonics-drupal-site
view core/modules/language/language.post_update.php @ 13:5fb285c0d0e3
Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've
been lucky to get away with this so far, as we don't support self-registration
which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5
was vulnerable to.
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:33:26 +0100 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line source
<?php /** * @file * Post update functions for Language module. */ use Drupal\Core\Entity\Entity\EntityFormDisplay; /** * Add the 'include_locked' settings to the 'language_select' widget. */ function language_post_update_language_select_widget() { foreach (EntityFormDisplay::loadMultiple() as $display_form) { $content = $display_form->get('content'); $changed = FALSE; foreach (array_keys($content) as $element) { if (isset($content[$element]['type']) && $content[$element]['type'] == 'language_select') { $content[$element]['settings']['include_locked'] = TRUE; $changed = TRUE; } } if ($changed) { $display_form->set('content', $content); $display_form->save(); } } }