Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
86db338c
Commit
86db338c
authored
Nov 23, 2005
by
Dries Buytaert
Browse files
- Patch #/38339 by crunchywelch: make the profile module display fields properly.
parent
90b3e88e
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/profile.module
View file @
86db338c
...
...
@@ -318,8 +318,8 @@ function profile_view_profile($user) {
if
(
$value
=
profile_view_field
(
$user
,
$field
))
{
$description
=
(
$field
->
visibility
==
PROFILE_PRIVATE
)
?
t
(
'The content of this field is private and only visible to yourself.'
)
:
''
;
$title
=
(
$field
->
type
!=
'checkbox'
)
?
check_plain
(
$field
->
title
)
:
''
;
$form
=
array
(
'#type'
=>
'item'
,
'#title'
=>
$title
,
'#value'
=>
$value
,
'#description'
=>
$description
);
$fields
[
$field
->
category
][
$field
->
name
]
=
drupal_get_form
(
'profile_view_profile_'
.
$field
->
category
.
'_'
.
$field
->
name
,
$form
,
'profile_view_profile'
);
$form
=
array
(
'#title'
=>
$title
,
'#value'
=>
$value
,
'#description'
=>
$description
);
$fields
[
$field
->
category
][
$field
->
name
]
=
theme
(
'item'
,
$form
);
}
}
...
...
modules/profile/profile.module
View file @
86db338c
...
...
@@ -318,8 +318,8 @@ function profile_view_profile($user) {
if
(
$value
=
profile_view_field
(
$user
,
$field
))
{
$description
=
(
$field
->
visibility
==
PROFILE_PRIVATE
)
?
t
(
'The content of this field is private and only visible to yourself.'
)
:
''
;
$title
=
(
$field
->
type
!=
'checkbox'
)
?
check_plain
(
$field
->
title
)
:
''
;
$form
=
array
(
'#type'
=>
'item'
,
'#title'
=>
$title
,
'#value'
=>
$value
,
'#description'
=>
$description
);
$fields
[
$field
->
category
][
$field
->
name
]
=
drupal_get_form
(
'profile_view_profile_'
.
$field
->
category
.
'_'
.
$field
->
name
,
$form
,
'profile_view_profile'
);
$form
=
array
(
'#title'
=>
$title
,
'#value'
=>
$value
,
'#description'
=>
$description
);
$fields
[
$field
->
category
][
$field
->
name
]
=
theme
(
'item'
,
$form
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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