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
eeae26b2
Commit
eeae26b2
authored
Feb 16, 2006
by
Dries Buytaert
Browse files
- Patch
#49132
by Tobias and Zen: fixed problem with profile fields being mangled.
parent
ae470d69
Changes
4
Hide whitespace changes
Inline
Side-by-side
modules/profile.module
View file @
eeae26b2
...
...
@@ -314,7 +314,7 @@ function profile_view_profile($user) {
while
(
$field
=
db_fetch_object
(
$result
))
{
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
)
:
''
;
$title
=
(
$field
->
type
!=
'checkbox'
)
?
check_plain
(
$field
->
title
)
:
NULL
;
$item
=
array
(
'title'
=>
$title
,
'value'
=>
$value
,
'class'
=>
$field
->
name
,
...
...
modules/profile/profile.module
View file @
eeae26b2
...
...
@@ -314,7 +314,7 @@ function profile_view_profile($user) {
while
(
$field
=
db_fetch_object
(
$result
))
{
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
)
:
''
;
$title
=
(
$field
->
type
!=
'checkbox'
)
?
check_plain
(
$field
->
title
)
:
NULL
;
$item
=
array
(
'title'
=>
$title
,
'value'
=>
$value
,
'class'
=>
$field
->
name
,
...
...
modules/user.module
View file @
eeae26b2
...
...
@@ -642,22 +642,22 @@ function theme_user_picture($account) {
* @ingroup themeable
*/
function theme_user_profile($account, $fields) {
$output =
"
<div class=
\
"profile
\
">
\n"
;
$output =
'
<div class="profile">
'
;
$output .= theme('user_picture', $account);
foreach ($fields as $category => $items) {
if (strlen($category) > 0) {
$output .= '<h2 class="title">'. $category .
"
</h2>
\n"
;
$output .= '<h2 class="title">'. $category .
'
</h2>
'
;
}
$output .= '<dl>';
foreach ($items as $item) {
if (isset($item['title'])) {
$output .= '<dt class="'. $item['class'] .'">'. $item['title'] .'
:
</dt>';
$output .= '<dt class="'. $item['class'] .'">'. $item['title'] .'</dt>';
}
$output .= '<dd class="'. $item['class'] .'">'. $item['value'] .'</dd>';
}
$output .= '</dl>';
}
$output .=
"
</div>
\n"
;
$output .=
'
</div>
'
;
return $output;
}
...
...
modules/user/user.module
View file @
eeae26b2
...
...
@@ -642,22 +642,22 @@ function theme_user_picture($account) {
* @ingroup themeable
*/
function theme_user_profile($account, $fields) {
$output =
"
<div class=
\
"profile
\
">
\n"
;
$output =
'
<div class="profile">
'
;
$output .= theme('user_picture', $account);
foreach ($fields as $category => $items) {
if (strlen($category) > 0) {
$output .= '<h2 class="title">'. $category .
"
</h2>
\n"
;
$output .= '<h2 class="title">'. $category .
'
</h2>
'
;
}
$output .= '<dl>';
foreach ($items as $item) {
if (isset($item['title'])) {
$output .= '<dt class="'. $item['class'] .'">'. $item['title'] .'
:
</dt>';
$output .= '<dt class="'. $item['class'] .'">'. $item['title'] .'</dt>';
}
$output .= '<dd class="'. $item['class'] .'">'. $item['value'] .'</dd>';
}
$output .= '</dl>';
}
$output .=
"
</div>
\n"
;
$output .=
'
</div>
'
;
return $output;
}
...
...
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