forked from GNUsocial/gnu-social
Fixed remote subscribe avatar problems
Had some Avatar file-copying issues; seem to be fixed.
This commit is contained in:
parent
32744124bc
commit
47a5d2b7f0
@ -237,7 +237,13 @@ class FinishremotesubscribeAction extends Action
|
|||||||
{
|
{
|
||||||
$temp_filename = tempnam(sys_get_temp_dir(), 'listener_avatar');
|
$temp_filename = tempnam(sys_get_temp_dir(), 'listener_avatar');
|
||||||
copy($url, $temp_filename);
|
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)
|
function access_token($omb)
|
||||||
|
@ -330,7 +330,13 @@ class UserauthorizationAction extends Action
|
|||||||
{
|
{
|
||||||
$temp_filename = tempnam(sys_get_temp_dir(), 'listenee_avatar');
|
$temp_filename = tempnam(sys_get_temp_dir(), 'listenee_avatar');
|
||||||
copy($url, $temp_filename);
|
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)
|
function showAcceptMessage($tok)
|
||||||
|
Loading…
Reference in New Issue
Block a user