summaryrefslogtreecommitdiff
path: root/modules/field/field.install
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-04-12 00:50:52 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2012-04-12 00:50:52 -0700
commite22feb71235729868069fbe862e804d66369d335 (patch)
tree77d422740ad03bbb199bf1be83d27e3d62206dd8 /modules/field/field.install
parent84194b38e368beec5acecee825d4ee3d01bf53a6 (diff)
downloadbrdo-e22feb71235729868069fbe862e804d66369d335.tar.gz
brdo-e22feb71235729868069fbe862e804d66369d335.tar.bz2
Issue #1211008 by yched, tim.plunkett, DamienMcKenna: Split field_bundle_settings() out per bundle.
Diffstat (limited to 'modules/field/field.install')
-rw-r--r--modules/field/field.install24
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/field/field.install b/modules/field/field.install
index 407b5faff..dff3949fb 100644
--- a/modules/field/field.install
+++ b/modules/field/field.install
@@ -436,3 +436,27 @@ function field_update_7001() {
/**
* @} End of "addtogroup updates-6.x-to-7.x"
*/
+
+/**
+ * @addtogroup updates-7.x-extra
+ * @{
+ */
+
+/**
+ * Split the all-inclusive field_bundle_settings variable per bundle.
+ */
+function field_update_7002() {
+ $settings = variable_get('field_bundle_settings', array());
+ if ($settings) {
+ foreach ($settings as $entity_type => $entity_type_settings) {
+ foreach ($entity_type_settings as $bundle => $bundle_settings) {
+ variable_set('field_bundle_settings_' . $entity_type . '__' . $bundle, $bundle_settings);
+ }
+ }
+ variable_del('field_bundle_settings');
+ }
+}
+
+/**
+ * @} End of "addtogroup updates-7.x-extra"
+ */