Add comment on required changes in upcoming releases
This commit is contained in:
parent
3a0fa5cb29
commit
5792f4bf07
@ -925,11 +925,27 @@ function import_xchan($arr, $ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) {
|
||||
$local = q("select channel_account_id, channel_id from channel where channel_hash = '%s' limit 1",
|
||||
dbesc($xchan_hash)
|
||||
);
|
||||
|
||||
if($local) {
|
||||
// @FIXME This should be removed in future when profile photo update by file sync procedure will be applied
|
||||
// on most hubs in the network
|
||||
// <---
|
||||
$ph = z_fetch_url($arr['photo'], true);
|
||||
|
||||
if($ph['success']) {
|
||||
|
||||
// Do not fetch already received thumbnails
|
||||
$x = q("SELECT resource_id FROM photo WHERE uid = %d AND imgscale = %d AND filesize = %d LIMIT 1",
|
||||
intval($local[0]['channel_id']),
|
||||
intval(PHOTO_RES_PROFILE_300),
|
||||
strlen($ph['body'])
|
||||
);
|
||||
|
||||
if($x)
|
||||
$hash = $x[0]['resource_id'];
|
||||
else
|
||||
$hash = import_channel_photo($ph['body'], $arr['photo_mimetype'], $local[0]['channel_account_id'], $local[0]['channel_id']);
|
||||
}
|
||||
|
||||
if($hash) {
|
||||
// unless proven otherwise
|
||||
@ -955,6 +971,7 @@ function import_xchan($arr, $ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) {
|
||||
);
|
||||
}
|
||||
}
|
||||
// --->
|
||||
|
||||
// reset the names in case they got messed up when we had a bug in this function
|
||||
$photos = array(
|
||||
@ -965,7 +982,6 @@ function import_xchan($arr, $ud_flags = UPDATE_FLAGS_UPDATED, $ud_arr = null) {
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$photos = import_xchan_photo($arr['photo'], $xchan_hash);
|
||||
}
|
||||
|
Reference in New Issue
Block a user