|
From: Jonathan H. <the...@us...> - 2002-03-01 17:42:55
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv11105
Modified Files:
profile.php
Log Message:
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 :(
Index: profile.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/profile.php,v
retrieving revision 1.183
retrieving revision 1.184
diff -C2 -r1.183 -r1.184
*** profile.php 25 Feb 2002 01:17:59 -0000 1.183
--- profile.php 1 Mar 2002 17:42:51 -0000 1.184
***************
*** 1504,1507 ****
--- 1504,1520 ----
}
+ //
+ // 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,
***************
*** 1605,1608 ****
--- 1618,1622 ----
"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"))
);
***************
*** 1613,1621 ****
// it works well :)
//
! 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']) )
{
$template->assign_block_vars("avatarblock.avatarupload", array() );
--- 1627,1635 ----
// it works well :)
//
! 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']) && $form_enctype != '')
{
$template->assign_block_vars("avatarblock.avatarupload", array() );
***************
*** 1998,2000 ****
}
! ?>
\ No newline at end of file
--- 2012,2014 ----
}
! ?>
|