From 03d3a39d3cf0b0837ab6bbabc2f2b9b944cad569 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Mon, 24 Dec 2001 14:46:35 +0000 Subject: [PATCH] Minor change, checks for existence of required avatar directories when deciding whether to enable various avatar options. git-svn-id: file:///svn/phpbb/trunk@1698 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/profile.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/phpBB/profile.php b/phpBB/profile.php index 780951ad8a..b228040397 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -612,7 +612,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) if( !$error ) { $password = md5($password); - $passwd_sql = "user_password = '" . str_replace("\'", "''", $password) . "', "; + $passwd_sql = "user_password = '$password', "; } } } @@ -1402,7 +1402,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) $coppa = ( ( !$HTTP_POST_VARS['coppa'] && !$HTTP_GET_VARS['coppa'] ) || $mode == "register") ? 0 : TRUE; $s_hidden_vars = ''; - $s_hidden_vars .= ''; + $s_hidden_vars .= ''; $s_hidden_vars .= ''; $s_hidden_vars .= ''; $s_hidden_vars .= ''; @@ -1651,15 +1651,17 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) { $template->assign_block_vars("avatarblock", array() ); - if($board_config['allow_avatar_upload']) + if($board_config['allow_avatar_upload'] && file_exists("./" . $board_config['avatar_path']) ) { $template->assign_block_vars("avatarblock.avatarupload", array() ); } + if($board_config['allow_avatar_remote']) { $template->assign_block_vars("avatarblock.avatarremote", array() ); } - if($board_config['allow_avatar_local']) + + if($board_config['allow_avatar_local'] && file_exists("./" . $board_config['avatar_gallery_path']) ) { $template->assign_block_vars("avatarblock.avatargallery", array() ); }