From c0b875aa38651d6f28549170d0711e6b98c66e01 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Thu, 11 Oct 2001 22:22:28 +0000 Subject: [PATCH] That stupid broken is_die and filetype ... ran fine under Win2K, failed under Linux, workaround in place git-svn-id: file:///svn/phpbb/trunk@1174 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/profile.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/phpBB/profile.php b/phpBB/profile.php index 29627ec6d7..72c992a0b6 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -1259,7 +1259,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) $avatar_images = array(); while( $file = @readdir($dir) ) { - if( @filetype($file) == "dir" && !preg_match("/\.\.|\./", $file) ) + if( $file != "." && $file != ".." && !is_file($file) && !is_link($file) ) { $sub_dir = @opendir($board_config['avatar_gallery_path'] . "/" . $file); @@ -1369,6 +1369,15 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) } else { + if( $mode == "editprofile" ) + { + if( $user_id != $userdata['user_id'] ) + { + $error = TRUE; + $error_msg = $lang['Wrong_Profile']; + } + } + if( !isset($coppa) ) { $coppa = FALSE;