diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2009-07-14 20:25:41 +0000 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2009-07-14 20:25:41 +0000 |
| commit | 0b2979c6bab97297f839937606635fd4cc6b1eae (patch) | |
| tree | 592bd29d82cda1d1607b0a12ad6f598c32b1213b /phpBB/includes/ucp/ucp_profile.php | |
| parent | 753b8bb0bb6f6c8398189be451cc5095759c1e3e (diff) | |
| download | forums-0b2979c6bab97297f839937606635fd4cc6b1eae.tar forums-0b2979c6bab97297f839937606635fd4cc6b1eae.tar.gz forums-0b2979c6bab97297f839937606635fd4cc6b1eae.tar.bz2 forums-0b2979c6bab97297f839937606635fd4cc6b1eae.tar.xz forums-0b2979c6bab97297f839937606635fd4cc6b1eae.zip | |
Feature Bug #45375 - Add option to disable remote upload avatars
Authorised by: AcydBurn
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9757 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_profile.php')
| -rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index d93567c543..a7785e7163 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -564,7 +564,7 @@ class ucp_profile $avatar_select = basename(request_var('avatar_select', '')); $category = basename(request_var('category', '')); - $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false; + $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false; add_form_key('ucp_avatar'); @@ -605,7 +605,7 @@ class ucp_profile 'U_GALLERY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=profile&mode=avatar&display_gallery=1'), - 'S_FORM_ENCTYPE' => ($can_upload) ? ' enctype="multipart/form-data"' : '', + 'S_FORM_ENCTYPE' => ($can_upload && ($config['allow_avatar_upload'] || $config['allow_avatar_remote_upload'])) ? ' enctype="multipart/form-data"' : '', 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024), )); @@ -616,15 +616,15 @@ class ucp_profile } else if ($config['allow_avatar']) { - $avatars_enabled = ($can_upload || ($auth->acl_get('u_chgavatar') && ($config['allow_avatar_local'] || $config['allow_avatar_remote']))) ? true : false; + $avatars_enabled = (($can_upload && ($config['allow_avatar_upload'] || $config['allow_avatar_remote_upload'])) || ($auth->acl_get('u_chgavatar') && ($config['allow_avatar_local'] || $config['allow_avatar_remote']))) ? true : false; $template->assign_vars(array( 'AVATAR_WIDTH' => request_var('width', $user->data['user_avatar_width']), 'AVATAR_HEIGHT' => request_var('height', $user->data['user_avatar_height']), 'S_AVATARS_ENABLED' => $avatars_enabled, - 'S_UPLOAD_AVATAR_FILE' => $can_upload, - 'S_UPLOAD_AVATAR_URL' => $can_upload, + 'S_UPLOAD_AVATAR_FILE' => ($can_upload && $config['allow_avatar_upload']) ? true : false, + 'S_UPLOAD_AVATAR_URL' => ($can_upload && $config['allow_avatar_remote_upload']) ? true : false, 'S_LINK_AVATAR' => ($auth->acl_get('u_chgavatar') && $config['allow_avatar_remote']) ? true : false, 'S_DISPLAY_GALLERY' => ($auth->acl_get('u_chgavatar') && $config['allow_avatar_local']) ? true : false) ); |
