diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-08-04 20:40:01 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-08-04 20:40:01 +0000 |
commit | c71bfded3dea1754633f29ac8e81fb3ab46b766a (patch) | |
tree | 77a7a843b7b6d9c0f857c749b9acbab19c1f8e94 /modules/user/user.module | |
parent | a52cf8297aa8c012065a4cb4e3f6a6ee3e258fc1 (diff) | |
download | brdo-c71bfded3dea1754633f29ac8e81fb3ab46b766a.tar.gz brdo-c71bfded3dea1754633f29ac8e81fb3ab46b766a.tar.bz2 |
- Patch #9657: more intelligent theme() function. Hopefully, Adrian will be
able to use this patch too.
Diffstat (limited to 'modules/user/user.module')
-rw-r--r-- | modules/user/user.module | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index 9c9b0883c..42a5c395c 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -567,7 +567,8 @@ function theme_user_picture($account) { } if ($picture) { - $picture = "<img src=\"$picture\" alt=\"" . t('%user\'s picture', array('%user' => $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 .= '<img src="'. file_create_url($edit['picture']) .'" alt="" title="" />'; + $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); |