profile photo propagation issue if the local xchan_photo_[l|m|s] fields were changed from the /photo/profile/l/n form to photo/[hash] form by a clone operation.
This commit is contained in:
parent
8bd4e004ff
commit
9dcbef4cb1
@ -158,6 +158,9 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
|||||||
intval(local_channel())
|
intval(local_channel())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
send_profile_photo_activity($channel,$base_image,$profile);
|
send_profile_photo_activity($channel,$base_image,$profile);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -174,12 +177,17 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
// We'll set the updated profile-photo timestamp even if it isn't the default profile,
|
// We'll set the updated profile-photo timestamp even if it isn't the default profile,
|
||||||
// so that browsers will do a cache update unconditionally
|
// so that browsers will do a cache update unconditionally
|
||||||
|
// Also set links back to site-specific profile photo url in case it was
|
||||||
|
// changed to a generic URL by a clone operation. Otherwise the new photo may
|
||||||
|
// not get pushed to other sites correctly.
|
||||||
|
|
||||||
|
$r = q("UPDATE xchan set xchan_photo_mimetype = '%s', xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s'
|
||||||
$r = q("UPDATE xchan set xchan_photo_mimetype = '%s', xchan_photo_date = '%s'
|
|
||||||
where xchan_hash = '%s'",
|
where xchan_hash = '%s'",
|
||||||
dbesc($im->getType()),
|
dbesc($im->getType()),
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
|
dbesc(z_root() . '/photo/profile/l/' . $channel['channel_id']),
|
||||||
|
dbesc(z_root() . '/photo/profile/m/' . $channel['channel_id']),
|
||||||
|
dbesc(z_root() . '/photo/profile/s/' . $channel['channel_id']),
|
||||||
dbesc($channel['xchan_hash'])
|
dbesc($channel['xchan_hash'])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user