1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-31 11:39:37 +02:00

Ok it's official, I'm an idiot... Doesn't do much good to commit the updates to the profile template without the update to profile :(

git-svn-id: file:///svn/phpbb/trunk@2242 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
the_systech 2002-03-01 17:42:51 +00:00
parent ab516ec67d
commit ebef119796

View File

@ -1503,6 +1503,19 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
$template->assign_block_vars("edit_profile", array());
}
//
// Let's do an overall check for settings/versions which would prevent
// us from doing file uploads....
//
if( (get_cfg_var('file_uploads') == 0) || (strtolower(get_cfg_var('file_uploads')) == 'off')|| (phpversion() == '4.0.4pl1') || (!$board_config['allow_avatar_upload']) )
{
$form_enctype = '';
}
else
{
$form_enctype = 'enctype="multipart/form-data"';
}
$template->assign_vars(array(
"USERNAME" => $username,
"EMAIL" => $email,
@ -1604,6 +1617,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
"S_ALLOW_AVATAR_LOCAL" => $board_config['allow_avatar_local'],
"S_ALLOW_AVATAR_REMOTE" => $board_config['allow_avatar_remote'],
"S_HIDDEN_FIELDS" => $s_hidden_fields,
"S_FORM_ENCTYPE" => $form_enctype,
"S_PROFILE_ACTION" => append_sid("profile.$phpEx"))
);
@ -1612,11 +1626,11 @@ 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'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) )
if( $userdata['user_allowavatar'] && ( ($board_config['allow_avatar_upload'] && $form_enctype != '') || $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']) )
if($board_config['allow_avatar_upload'] && file_exists("./" . $board_config['avatar_path']) && $form_enctype != '')
{
$template->assign_block_vars("avatarblock.avatarupload", array() );
}
@ -1997,4 +2011,4 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
}
}
?>
?>