diff options
author | Meitar Moscovitz <meitarm@gmail.com> | 2009-02-10 18:28:12 +1100 |
---|---|---|
committer | Meitar Moscovitz <meitarm@gmail.com> | 2009-02-10 18:28:12 +1100 |
commit | 3585012380bd8352b8e7bbb605bed05a9148fe11 (patch) | |
tree | cab877aa2ad7001eb5bf593c79ec72e7e09ca0fd /actions | |
parent | 8cb3035b89df32e8194f7607bb8d098f57f81d23 (diff) | |
parent | 47a5d2b7f06cd1612734c47ad21fc397bbff5276 (diff) |
Merge branch 'dev-0.7.x' into link-rel-paginate
Diffstat (limited to 'actions')
-rw-r--r-- | actions/finishremotesubscribe.php | 8 | ||||
-rw-r--r-- | actions/userauthorization.php | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/actions/finishremotesubscribe.php b/actions/finishremotesubscribe.php index f9094a50c..76db887de 100644 --- a/actions/finishremotesubscribe.php +++ b/actions/finishremotesubscribe.php @@ -237,7 +237,13 @@ class FinishremotesubscribeAction extends Action { $temp_filename = tempnam(sys_get_temp_dir(), 'listener_avatar'); copy($url, $temp_filename); - return $profile->setOriginal($temp_filename); + $imagefile = new ImageFile($profile->id, $temp_filename); + $filename = Avatar::filename($profile->id, + image_type_to_extension($imagefile->type), + null, + common_timestamp()); + rename($temp_filename, Avatar::path($filename)); + return $profile->setOriginal($filename); } function access_token($omb) diff --git a/actions/userauthorization.php b/actions/userauthorization.php index 7455a41a6..ed17ceec9 100644 --- a/actions/userauthorization.php +++ b/actions/userauthorization.php @@ -330,7 +330,13 @@ class UserauthorizationAction extends Action { $temp_filename = tempnam(sys_get_temp_dir(), 'listenee_avatar'); copy($url, $temp_filename); - return $profile->setOriginal($temp_filename); + $imagefile = new ImageFile($profile->id, $temp_filename); + $filename = Avatar::filename($profile->id, + image_type_to_extension($imagefile->type), + null, + common_timestamp()); + rename($temp_filename, Avatar::path($filename)); + return $profile->setOriginal($filename); } function showAcceptMessage($tok) |