diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php index 2c55f5fc2c..714d1b05f0 100644 --- a/phpBB/admin/admin_board.php +++ b/phpBB/admin/admin_board.php @@ -122,14 +122,6 @@ $smtp_no = ( !$new['smtp_delivery'] ) ? "checked=\"checked\"" : ""; $template->set_filenames(array( "body" => "admin/board_config_body.tpl") ); -// -// Check to see if file uploads are possible before displaying -// avatar upload option. -// -if( (get_cfg_var('file_uploads') != 0) && (strtolower(get_cfg_var('file_uploads')) != 'off') && (phpversion() != '4.0.4pl1') ) -{ - $template->assign_block_vars('switch_uploads_possible', array()); -} // // Escape any quotes in the site description for proper display in the text diff --git a/phpBB/admin/admin_users.php b/phpBB/admin/admin_users.php index bbc9905fda..a9cf26b336 100644 --- a/phpBB/admin/admin_users.php +++ b/phpBB/admin/admin_users.php @@ -1107,6 +1107,10 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) | if( file_exists("./../" . $board_config['avatar_path']) ) { $template->assign_block_vars("avatarupload", array() ); + if($form_enctype != '') + { + $template->assign_block_vars('avatarupload.fileuploads', array() ); + } } if( file_exists("./../" . $board_config['avatar_gallery_path']) ) diff --git a/phpBB/profile.php b/phpBB/profile.php index b8e64e042e..74578fd6d6 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -1626,13 +1626,17 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) // of the templates to 'fake' an IF...ELSE...ENDIF solution // it works well :) // - if( $userdata['user_allowavatar'] && ( ($board_config['allow_avatar_upload'] && $form_enctype != '') || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) ) + if( $userdata['user_allowavatar'] && ( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) ) { $template->assign_block_vars("avatarblock", array() ); - if($board_config['allow_avatar_upload'] && file_exists("./" . $board_config['avatar_path']) && $form_enctype != '') + if($board_config['allow_avatar_upload'] && file_exists("./" . $board_config['avatar_path'])) { $template->assign_block_vars("avatarblock.avatarupload", array() ); + if( $form_enctype != '' ) + { + $template->assign_block_vars("avatarblock.avatarupload.avatarfileupload", array() ); + } } if($board_config['allow_avatar_remote']) diff --git a/phpBB/templates/subSilver/admin/board_config_body.tpl b/phpBB/templates/subSilver/admin/board_config_body.tpl index 0447747cb6..e3739d49c4 100644 --- a/phpBB/templates/subSilver/admin/board_config_body.tpl +++ b/phpBB/templates/subSilver/admin/board_config_body.tpl @@ -178,12 +178,10 @@ {L_ALLOW_REMOTE}
{L_ALLOW_REMOTE_EXPLAIN} {L_YES}   {L_NO} - {L_ALLOW_UPLOAD} {L_YES}   {L_NO} - {L_MAX_FILESIZE}
{L_MAX_FILESIZE_EXPLAIN} Bytes diff --git a/phpBB/templates/subSilver/admin/user_edit_body.tpl b/phpBB/templates/subSilver/admin/user_edit_body.tpl index 1790582c98..d73f25d21c 100644 --- a/phpBB/templates/subSilver/admin/user_edit_body.tpl +++ b/phpBB/templates/subSilver/admin/user_edit_body.tpl @@ -223,6 +223,7 @@ + {L_UPLOAD_AVATAR_FILE} @@ -230,6 +231,7 @@ + {L_UPLOAD_AVATAR_URL} diff --git a/phpBB/templates/subSilver/profile_add_body.tpl b/phpBB/templates/subSilver/profile_add_body.tpl index 05ebadee9f..7c445a963f 100644 --- a/phpBB/templates/subSilver/profile_add_body.tpl +++ b/phpBB/templates/subSilver/profile_add_body.tpl @@ -232,6 +232,7 @@ + {L_UPLOAD_AVATAR_FILE}: @@ -239,6 +240,7 @@ + {L_UPLOAD_AVATAR_URL}:
{L_UPLOAD_AVATAR_URL_EXPLAIN}