Commit eeae26b2 authored by Dries's avatar Dries

- Patch #49132 by Tobias and Zen: fixed problem with profile fields being mangled.

parent ae470d69
......@@ -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,
......
......@@ -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,
......
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
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