updated profile_picture plugin
I just updated my version with the profile_picture plugin with a patch supplied by Johannes Harms. I haven’t had the time to test it thoroughly, so use it on your own risk. More info on this page
If you’re interested, you can check the patch here below:
— profile-picture.php.01_adminCanUploadPics 2008-07-02 19:51:00.000000000 +0200
+++ profile-picture.php.02_chmodUploads 2008-07-04 12:03:05.000000000 +0200
@@ -152,8 +152,12 @@ function upload_pic() {
$clean_name = ereg_replace(”[^a-z0-9._]“, “”, ereg_replace(” “, “_”, ereg_replace(”%20″, “_”, strtolower($raw_name))));
$file_ext = substr(strrchr($clean_name, “.”), 1);
$file_path = clean_path(ABSPATH . ‘/’ . $image_dir . ‘/’ . $user_ID . ‘.’ . $file_ext);
- // store file
+ // store file
move_uploaded_file($_FILES['picture']['tmp_name'], $file_path);
+ // Add file permissions
+ $stat = stat( dirname( $file_path ));
+ $perms = $stat['mode'] & 0000666;
+ @ chmod( $file_path, $perms);
} else {
return false;
}
@@ -260,4 +264,4 @@ function pick_image($authorID) {
}
return $path;
}
-?>
\ No newline at end of file
+?>
