From c71bfded3dea1754633f29ac8e81fb3ab46b766a Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 4 Aug 2004 20:40:01 +0000 Subject: - Patch #9657: more intelligent theme() function. Hopefully, Adrian will be able to use this patch too. --- modules/user.module | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/user.module') diff --git a/modules/user.module b/modules/user.module index 9c9b0883c..42a5c395c 100644 --- a/modules/user.module +++ b/modules/user.module @@ -567,7 +567,8 @@ function theme_user_picture($account) { } if ($picture) { - $picture = "\"" $account->name ? $account->name : t(variable_get('anonymous', 'Anonymous')))) . '" />'; + $alt = t('%user\'s picture', array('%user' => $account->name ? $account->name : t(variable_get('anonymous', 'Anonymous')))); + $picture = theme('image', $picture, $alt, $alt); if ($account->uid) { $picture = l($picture, "user/$account->uid", array('title' => t('View user profile.'))); } @@ -1019,7 +1020,7 @@ function user_edit_form($uid, $edit) { if (variable_get('user_pictures', 0)) { $group = ''; if (file_exists($edit['picture'])) { - $group .= ''; + $group .= theme('image', file_create_url($edit['picture'])); } $group .= form_file(t('Upload picture'), 'picture', 48, t('Your virtual face or picture. Maximum dimensions are %dimensions and the maximum size is %size kB.', array('%dimensions' => variable_get('user_picture_dimensions', '85x85'), '%size' => variable_get('user_picture_file_size', '30'))) .' '. variable_get('user_picture_guidelines', '')); $data[] = array('title' => t('Picture'), 'data' => $group, 'weight' => 1); -- cgit v1.2.3