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
3496498d
Commit
3496498d
authored
Jul 30, 2008
by
Matthias Hutterer
Browse files
fixes case 'sanitize' in hook_field
parent
2c8faafe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
email.module
email.module
+4
-4
No files found.
email.module
View file @
3496498d
...
...
@@ -67,7 +67,7 @@ function email_field($op, &$node, $field, &$items, $teaser, $page) {
case
'sanitize'
:
foreach
(
$items
as
$delta
=>
$item
)
{
$items
[
$delta
][
'
nid
'
]
=
$node
->
nid
;
$items
[
$delta
][
'
safe
'
]
=
check_plain
(
$item
[
'email'
])
;
}
break
;
}
...
...
@@ -116,7 +116,7 @@ function email_field_formatter_info() {
* Theme function for 'default' email field formatter.
*/
function
theme_email_formatter_default
(
$element
)
{
return
'<a href="mailto:'
.
$element
[
'#item'
][
'email'
]
.
'">'
.
check_plain
(
$element
[
'#item'
][
'
email
'
]
)
.
'</a>'
;
return
'<a href="mailto:'
.
$element
[
'#item'
][
'email'
]
.
'">'
.
$element
[
'#item'
][
'
safe
'
]
.
'</a>'
;
}
/**
...
...
@@ -127,7 +127,7 @@ function theme_email_formatter_spamspan($element) {
return
spamspan
(
$element
[
'#item'
][
'email'
]);
}
else
{
return
'<a href="mailto:'
.
$element
[
'#item'
][
'email'
]
.
'">'
.
check_plain
(
$element
[
'#item'
][
'
email
'
]
)
.
'</a>'
;
return
'<a href="mailto:'
.
$element
[
'#item'
][
'email'
]
.
'">'
.
$element
[
'#item'
][
'
safe
'
]
.
'</a>'
;
}
}
...
...
@@ -135,7 +135,7 @@ function theme_email_formatter_spamspan($element) {
* Theme function for 'contact' email field formatter.
*/
function
theme_email_formatter_contact
(
$element
)
{
return
l
(
t
(
'Email contact form'
),
'email/'
.
$element
[
'#
item'
][
'
nid
'
]
.
'/'
.
$element
[
'#field_name'
]);
return
l
(
t
(
'Email contact form'
),
'email/'
.
$element
[
'#
node'
]
->
nid
.
'/'
.
$element
[
'#field_name'
]);
}
...
...
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