diff options
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Cover_photo.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Zotlabs/Module/Cover_photo.php b/Zotlabs/Module/Cover_photo.php index 89bfcc281..b67c00cdc 100644 --- a/Zotlabs/Module/Cover_photo.php +++ b/Zotlabs/Module/Cover_photo.php @@ -56,18 +56,19 @@ class Cover_photo extends \Zotlabs\Web\Controller { intval(PHOTO_COVER), intval(local_channel()) ); - - q("update photo set photo_usage = %d where photo_usage = %d and uid = %d", - intval(PHOTO_NORMAL), - intval(PHOTO_COVER), - intval(local_channel()) - ); if($r) { + q("update photo set photo_usage = %d where photo_usage = %d and uid = %d", + intval(PHOTO_NORMAL), + intval(PHOTO_COVER), + intval(local_channel()) + ); + $sync = attach_export_data($channel,$r[0]['resource_id']); if($sync) build_sync_packet($channel['channel_id'],array('file' => array($sync))); } + goaway(z_root() . '/cover_photo'); } |