diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-05-27 00:37:15 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-05-27 00:37:15 +0000 |
| commit | b6a0ce82d413a55f95c3c7149e9d9bf47cf2f6aa (patch) | |
| tree | c4143776c679666a5b7afe57f0dc02914ce287f0 /phpBB/includes/ucp/ucp_profile.php | |
| parent | e1484f522d28194c63d424bc621b93d3cf8865b9 (diff) | |
| download | forums-b6a0ce82d413a55f95c3c7149e9d9bf47cf2f6aa.tar forums-b6a0ce82d413a55f95c3c7149e9d9bf47cf2f6aa.tar.gz forums-b6a0ce82d413a55f95c3c7149e9d9bf47cf2f6aa.tar.bz2 forums-b6a0ce82d413a55f95c3c7149e9d9bf47cf2f6aa.tar.xz forums-b6a0ce82d413a55f95c3c7149e9d9bf47cf2f6aa.zip | |
Some cleanup ... fixes
git-svn-id: file:///svn/phpbb/trunk@4063 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_profile.php')
| -rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index a2e811cdbb..d5e757b326 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -361,6 +361,7 @@ class ucp_profile extends ucp ) ); $data = $this->normalise_data($_POST, $normalise); + $this->avatar_upload($data); } else if (!empty($_POST['remotelink'])) @@ -373,12 +374,12 @@ class ucp_profile extends ucp ) ); $data = $this->normalise_data($_POST, $normalise); + $this->avatar_remote($data); } else if (!empty($_POST['delete'])) { $data['filename'] = $data['width'] = $data['height'] = ''; - $this->avatar_delete(); } if (!sizeof($this->error)) @@ -395,8 +396,11 @@ class ucp_profile extends ucp WHERE user_id = ' . $user->data['user_id']; $db->sql_query($sql); - // Delete an existing avatar if present - $this->avatar_delete(); + // Delete old avatar if present + if ($user->data['user_avatar'] != '' && $data['filename'] != $user->data['user_avatar']) + { + $this->avatar_delete(); + } meta_refresh(3, "ucp.$phpEx$SID&i=$id&mode=$submode"); $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&i=$id&mode=$submode\">", '</a>'); @@ -450,7 +454,7 @@ class ucp_profile extends ucp 'AVATAR' => $avatar_img, 'AVATAR_SIZE' => $config['avatar_filesize'], 'AVATAR_URL' => (isset($uploadurl)) ? $uploadurl : '', - 'AVATAR_REMOTE' => (isset($remotelink)) ? $remotelink : (($user->data['user_avatar_type'] == AVATAR_REMOTE) ? $avatar_img : ''), + 'AVATAR_REMOTE' => (isset($remotelink)) ? $remotelink : (($user->data['user_avatar_type'] == AVATAR_REMOTE) ? $user->data['user_avatar'] : ''), 'WIDTH' => (isset($width)) ? $width : $user->data['user_avatar_width'], 'HEIGHT' => (isset($height)) ? $height : $user->data['user_avatar_height'], |
