summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-05-28 10:03:21 -0400
committerEvan Prodromou <evan@prodromou.name>2008-05-28 10:03:21 -0400
commitde56ccca07e19c5163792c210ff5f6130e91d892 (patch)
tree4299ba46cabafe22ec26917372800cb309dc9c73 /actions
parent4f37f4b764068ec0e3269f19c740d494286ae37e (diff)
add timestamp to avatar filenames to prevent overlap
darcs-hash:20080528140321-84dde-2dbeb6032e845a23bb1adde1cbc1788333b55156.gz
Diffstat (limited to 'actions')
-rw-r--r--actions/avatar.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/actions/avatar.php b/actions/avatar.php
index 81eb23cec..023a8414a 100644
--- a/actions/avatar.php
+++ b/actions/avatar.php
@@ -108,7 +108,7 @@ class AvatarAction extends SettingsAction {
$user = common_current_user();
- $filename = common_avatar_filename($user, image_type_to_extension($info[2]));
+ $filename = common_avatar_filename($user, image_type_to_extension($info[2]), NULL, common_timestamp());
$filepath = common_avatar_path($filename);
if (!move_uploaded_file($_FILES['avatarfile']['tmp_name'], $filepath)) {
@@ -166,9 +166,9 @@ class AvatarAction extends SettingsAction {
imagecopyresampled($image_s, $image_a, 0, 0, 0, 0,
$size, $size, $square, $square);
- $ext = ($avatar->mediattype == 'image/jpeg') ? ".jpg" : ".png";
+ $ext = ($avatar->mediattype == 'image/jpeg') ? ".jpeg" : ".png";
- $filename = common_avatar_filename($user, $ext, $size);
+ $filename = common_avatar_filename($user, $ext, $size, common_timestamp());
if ($avatar->mediatype == 'image/jpeg') {
imagejpeg($image_s, common_avatar_path($filename));