Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
drupal.org
email
Commits
a384a4e6
Commit
a384a4e6
authored
Jan 20, 2011
by
Matthias Hutterer
Browse files
fixing formatter names when upgrading from d6 to d7
parent
f19fff3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
email.module
email.module
+17
-0
No files found.
email.module
View file @
a384a4e6
...
...
@@ -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'
];
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment