From 509067391b9e2b167827a7b999cb5ef455ac68d6 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Sat, 13 Apr 2019 14:08:44 +0200 Subject: Update xchan profile edited date only once --- include/import.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/import.php b/include/import.php index 585a0ac84..434a53f10 100644 --- a/include/import.php +++ b/include/import.php @@ -1417,8 +1417,6 @@ function sync_files($channel, $files) { $x = z_post_url($fetch_url,$parr,$redirects,[ 'filep' => $fp, 'headers' => $headers]); fclose($fp); - $p['os_syspath'] = $stored_image; - // Override remote hub thumbnails storage settings if(! boolval(get_config('system','filesystem_storage_thumbnails', 0))) { $p['os_storage'] = 0; @@ -1428,6 +1426,7 @@ function sync_files($channel, $files) { else { $p['os_storage'] = 1; $p['content'] = $stored_image; + $p['os_syspath'] = $stored_image; } } @@ -1461,13 +1460,15 @@ function sync_files($channel, $files) { } } - // Set xchan photo date to prevent thumbnails fetch for clones on profile update packet recieve - if(isset($update_xchan)) { - $x = q("UPDATE xchan SET xchan_photo_date = '%s' WHERE xchan_hash = '%s'", - dbescdate($update_xchan), - dbesc($channel['channel_hash']) - ); - } + } + + // Set xchan photo date to prevent thumbnails fetch for clones on profile update packet recieve + if(isset($update_xchan)) { + + $x = q("UPDATE xchan SET xchan_photo_date = '%s' WHERE xchan_hash = '%s'", + dbescdate($update_xchan), + dbesc($channel['channel_hash']) + ); } \Zotlabs\Daemon\Master::Summon([ 'Thumbnail' , $att['hash'] ]); -- cgit v1.2.3