Commit a384a4e6 authored by Matthias Hutterer's avatar Matthias Hutterer
Browse files

fixing formatter names when upgrading from d6 to d7

parent f19fff3a
......@@ -433,3 +433,20 @@ function email_admin_settings() {
);
return system_settings_form($form);
}
/**
* Implements hook_content_migrate_instance_alter().
*
* D6-D7 upgrade
* fixes new formatter names
*/
function email_content_migrate_instance_alter(&$instance_value, &$field_value) {
if ($field_value['module'] == 'email') {
foreach ($instance_value['display'] as $context => $settings) {
if (in_array($instance_value['display'][$context]['type'], array('default', 'plain', 'contact', 'spamspan'))) {
$instance_value['display'][$context]['type'] = 'email_' . $instance_value['display'][$context]['type'];
}
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment