Commit 52c0c18c authored by Dries's avatar Dries

- Patch #46622 by Neil: more forgiving hook_user('view').

parent 15ff8c8e
......@@ -628,10 +628,15 @@ function theme_user_profile($account, $fields) {
$output = "<div class=\"profile\">\n";
$output .= theme('user_picture', $account);
foreach ($fields as $category => $items) {
$output .= "<h2 class=\"title\">$category</h2>\n";
if (strlen($category) > 0) {
$output .= '<h2 class="title">'. $category ."</h2>\n";
}
$output .= '<dl>';
foreach ($items as $item) {
$output .= sprintf('<dt class="%s">%s:</dt><dd class="%s">%s</dd>', $item['class'], $item['title'], $item['class'], $item['value']);
if (isset($item['title'])) {
$output .= '<dt class="'. $item['class'] .'">'. $item['title'] .':</dt>';
}
$output .= '<dd class="'. $item['class'] .'">'. $item['value'] .'</dd>';
}
$output .= '</dl>';
}
......
......@@ -628,10 +628,15 @@ function theme_user_profile($account, $fields) {
$output = "<div class=\"profile\">\n";
$output .= theme('user_picture', $account);
foreach ($fields as $category => $items) {
$output .= "<h2 class=\"title\">$category</h2>\n";
if (strlen($category) > 0) {
$output .= '<h2 class="title">'. $category ."</h2>\n";
}
$output .= '<dl>';
foreach ($items as $item) {
$output .= sprintf('<dt class="%s">%s:</dt><dd class="%s">%s</dd>', $item['class'], $item['title'], $item['class'], $item['value']);
if (isset($item['title'])) {
$output .= '<dt class="'. $item['class'] .'">'. $item['title'] .':</dt>';
}
$output .= '<dd class="'. $item['class'] .'">'. $item['value'] .'</dd>';
}
$output .= '</dl>';
}
......
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