diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-29 08:01:55 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-29 08:01:55 +0000 |
commit | 52c0c18cad2ef3c67a9782c60af4017429299b2a (patch) | |
tree | adcaae993fc3442d358ff939bd227e95625e2fe2 | |
parent | 15ff8c8e32f6606ba73f765daa2b894ef88cd96c (diff) | |
download | brdo-52c0c18cad2ef3c67a9782c60af4017429299b2a.tar.gz brdo-52c0c18cad2ef3c67a9782c60af4017429299b2a.tar.bz2 |
- Patch #46622 by Neil: more forgiving hook_user('view').
-rw-r--r-- | modules/user.module | 9 | ||||
-rw-r--r-- | modules/user/user.module | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/modules/user.module b/modules/user.module index 190e3abf5..81723ce9a 100644 --- a/modules/user.module +++ b/modules/user.module @@ -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>'; } diff --git a/modules/user/user.module b/modules/user/user.module index 190e3abf5..81723ce9a 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -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>'; } |