diff options
Diffstat (limited to 'Zotlabs/Module/Profile_photo.php')
-rw-r--r-- | Zotlabs/Module/Profile_photo.php | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php index 29a239f4d..47b627015 100644 --- a/Zotlabs/Module/Profile_photo.php +++ b/Zotlabs/Module/Profile_photo.php @@ -108,11 +108,13 @@ class Profile_photo extends \Zotlabs\Web\Controller { $aid = get_account_id(); $p = [ - 'aid' => $aid, - 'uid' => local_channel(), - 'resource_id' => $base_image['resource_id'], - 'filename' => $base_image['filename'], - 'album' => t('Profile Photos') + 'aid' => $aid, + 'uid' => local_channel(), + 'resource_id' => $base_image['resource_id'], + 'filename' => $base_image['filename'], + 'album' => t('Profile Photos'), + 'os_path' => $base_image['os_path'], + 'display_path' => $base_image['display_path'] ]; $p['imgscale'] = PHOTO_RES_PROFILE_300; @@ -183,8 +185,12 @@ class Profile_photo extends \Zotlabs\Web\Controller { photo_profile_setperms(local_channel(),$base_image['resource_id'],$_REQUEST['profile']); + $sync = attach_export_data($channel,$base_image['resource_id']); + if($sync) + build_sync_packet($channel['channel_id'],array('file' => array($sync))); - // Similarly, tell the nav bar to bypass the cache and update the avater image. + + // Similarly, tell the nav bar to bypass the cache and update the avatar image. $_SESSION['reload_avatar'] = true; info( t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL); @@ -341,6 +347,11 @@ class Profile_photo extends \Zotlabs\Web\Controller { photo_profile_setperms(local_channel(),$resource_id,$_REQUEST['profile']); + $sync = attach_export_data($channel,$resource_id); + if($sync) + build_sync_packet($channel['channel_id'],array('file' => array($sync))); + + \Zotlabs\Daemon\Master::Summon(array('Directory',local_channel())); goaway(z_root() . '/profiles'); } |