mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
avatar stuff
git-svn-id: file:///svn/phpbb/trunk@4214 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
ff58fc5e7c
commit
c2516fa499
1 changed files with 5 additions and 5 deletions
|
@ -354,7 +354,7 @@ class ucp_profile extends ucp
|
||||||
$data = array();
|
$data = array();
|
||||||
if (!empty($_FILES['uploadfile']['tmp_name']) && $can_upload)
|
if (!empty($_FILES['uploadfile']['tmp_name']) && $can_upload)
|
||||||
{
|
{
|
||||||
avatar_upload($data);
|
$this->error = avatar_upload($data);
|
||||||
}
|
}
|
||||||
else if (!empty($_POST['uploadurl']) && $can_upload)
|
else if (!empty($_POST['uploadurl']) && $can_upload)
|
||||||
{
|
{
|
||||||
|
@ -365,7 +365,7 @@ class ucp_profile extends ucp
|
||||||
);
|
);
|
||||||
$data = $this->normalise_data($_POST, $normalise);
|
$data = $this->normalise_data($_POST, $normalise);
|
||||||
|
|
||||||
avatar_upload($data);
|
$this->error = avatar_upload($data);
|
||||||
}
|
}
|
||||||
else if (!empty($_POST['remotelink']) && $auth->acl_get('u_chgavatar') && $config['allow_avatar_remote'])
|
else if (!empty($_POST['remotelink']) && $auth->acl_get('u_chgavatar') && $config['allow_avatar_remote'])
|
||||||
{
|
{
|
||||||
|
@ -378,14 +378,14 @@ class ucp_profile extends ucp
|
||||||
);
|
);
|
||||||
$data = $this->normalise_data($_POST, $normalise);
|
$data = $this->normalise_data($_POST, $normalise);
|
||||||
|
|
||||||
avatar_remote($data);
|
$this->error = avatar_remote($data);
|
||||||
}
|
}
|
||||||
else if (!empty($_POST['delete']) && $auth->acl_get('u_chgavatar'))
|
else if (!empty($_POST['delete']) && $auth->acl_get('u_chgavatar'))
|
||||||
{
|
{
|
||||||
$data['filename'] = $data['width'] = $data['height'] = '';
|
$data['filename'] = $data['width'] = $data['height'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sizeof($this->error))
|
if (!$this->error)
|
||||||
{
|
{
|
||||||
// Do we actually have any data to update?
|
// Do we actually have any data to update?
|
||||||
if (sizeof($data))
|
if (sizeof($data))
|
||||||
|
@ -440,7 +440,7 @@ class ucp_profile extends ucp
|
||||||
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'ERROR' => (sizeof($this->error)) ? implode('<br />', $this->error) : '',
|
'ERROR' => ($this->error) ? $this->error : '',
|
||||||
|
|
||||||
'AVATAR' => $avatar_img,
|
'AVATAR' => $avatar_img,
|
||||||
'AVATAR_SIZE' => $config['avatar_filesize'],
|
'AVATAR_SIZE' => $config['avatar_filesize'],
|
||||||
|
|
Loading…
Add table
Reference in a new issue