aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-10-01 18:22:55 -0700
committerzotlabs <mike@macgirvin.com>2017-10-01 18:22:55 -0700
commit9dcbef4cb16bc2ac3c669832a8fbb2a583e48130 (patch)
tree3bacba498b398fc64a3d349bb2ea0df1aaa6e017
parent8bd4e004ffd1a10050a8ac1d440ef82e5d937837 (diff)
downloadvolse-hubzilla-9dcbef4cb16bc2ac3c669832a8fbb2a583e48130.tar.gz
volse-hubzilla-9dcbef4cb16bc2ac3c669832a8fbb2a583e48130.tar.bz2
volse-hubzilla-9dcbef4cb16bc2ac3c669832a8fbb2a583e48130.zip
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.
-rw-r--r--Zotlabs/Module/Profile_photo.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php
index 47b627015..27e6bc445 100644
--- a/Zotlabs/Module/Profile_photo.php
+++ b/Zotlabs/Module/Profile_photo.php
@@ -158,6 +158,9 @@ class Profile_photo extends \Zotlabs\Web\Controller {
intval(local_channel())
);
+
+
+
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,
// 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'
+ $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'
where xchan_hash = '%s'",
dbesc($im->getType()),
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'])
);