diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-10-13 21:24:03 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-10-13 21:24:03 +0000 |
| commit | eedef9518633fc5028a2bf8f8100a8ba9153878d (patch) | |
| tree | 5d6ae23e65535ec8207117ac11152242247276ec /phpBB/includes/ucp | |
| parent | 88787be77f58385681936099b982dff64371c452 (diff) | |
| download | forums-eedef9518633fc5028a2bf8f8100a8ba9153878d.tar forums-eedef9518633fc5028a2bf8f8100a8ba9153878d.tar.gz forums-eedef9518633fc5028a2bf8f8100a8ba9153878d.tar.bz2 forums-eedef9518633fc5028a2bf8f8100a8ba9153878d.tar.xz forums-eedef9518633fc5028a2bf8f8100a8ba9153878d.zip | |
Avatar CP issues ... must finish the gallery (item 28 on my list ...)
git-svn-id: file:///svn/phpbb/trunk@4597 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp')
| -rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 8457b50bda..367c0dd6d5 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -359,7 +359,7 @@ class ucp_profile extends module case 'avatar': // Can we upload? - $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || @ini_get('file_uploads') == 'On')) ? true : false; + $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false; if ($submit) { @@ -376,7 +376,7 @@ class ucp_profile extends module } $var_ary = array( - 'uploadurl' => array('string', false, 5, 255), + 'uploadurl' => array('string', true, 5, 255), 'remotelink' => array('string', true, 5, 255), 'width' => array('string', true, 1, 3), 'height' => array('string', true, 1, 3), @@ -388,15 +388,15 @@ class ucp_profile extends module { if (!empty($_FILES['uploadfile']['tmp_name']) && $can_upload) { - $error = avatar_upload($data); + $data = avatar_upload($data, $error); } else if ($data['uploadurl'] && $can_upload) { - $error = avatar_upload($uploadurl); + $data = avatar_upload($data, $error); } else if ($data['remotelink'] && $auth->acl_get('u_chgavatar') && $config['allow_avatar_remote']) { - $error = avatar_remote($data); + $data = avatar_remote($data, $error); } else if ($delete && $auth->acl_get('u_chgavatar')) { @@ -456,7 +456,7 @@ class ucp_profile extends module } $template->assign_vars(array( - 'ERROR' => ($error) ? $error : '', + 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '', 'AVATAR' => $avatar_img, 'AVATAR_SIZE' => $config['avatar_filesize'], |
