aboutsummaryrefslogtreecommitdiffstats
path: root/include/import.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-01-08 14:50:58 -0800
committerzotlabs <mike@macgirvin.com>2018-01-08 14:50:58 -0800
commit75804d7ce57a476c85a486c807ea1f5a75235a0e (patch)
tree13794288d5ffca739248d9ec017ef1a4cef9b93d /include/import.php
parentd4af870bb6500747790e6f196afeb4d75011185d (diff)
parent0600817ef75d19d1ec91ba822f8a6938d442824e (diff)
downloadvolse-hubzilla-75804d7ce57a476c85a486c807ea1f5a75235a0e.tar.gz
volse-hubzilla-75804d7ce57a476c85a486c807ea1f5a75235a0e.tar.bz2
volse-hubzilla-75804d7ce57a476c85a486c807ea1f5a75235a0e.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include/import.php')
-rw-r--r--include/import.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/import.php b/include/import.php
index a5e8adeb5..5a655ce4c 100644
--- a/include/import.php
+++ b/include/import.php
@@ -162,13 +162,17 @@ function import_profiles($channel, $profiles) {
convert_oldfields($profile,'work','employment');
/**
- * @TODO we are going to reset all profile photos to the original
- * somebody will have to fix this later and put all the applicable
- * photos into the export.
+ * @TODO put all the applicable photos into the export.
*/
- $profile['photo'] = z_root() . '/photo/profile/l/' . $channel['channel_id'];
- $profile['thumb'] = z_root() . '/photo/profile/m/' . $channel['channel_id'];
+ if((strpos($profile['thumb'],'/photo/profile/l/') !== false) || intval($profile['is_default'])) {
+ $profile['photo'] = z_root() . '/photo/profile/l/' . $channel['channel_id'];
+ $profile['thumb'] = z_root() . '/photo/profile/m/' . $channel['channel_id'];
+ }
+ else {
+ $profile['photo'] = z_root() . '/photo/' . basename($profile['photo']);
+ $profile['thumb'] = z_root() . '/photo/' . basename($profile['thumb']);
+ }
create_table_from_array('profile', $profile);
}
@@ -1328,6 +1332,9 @@ function sync_files($channel, $files) {
}
}
}
+
+ \Zotlabs\Daemon\Master::Summon([ 'Thumbnail' , $att['hash'] ]);
+
if($f['item']) {
sync_items($channel,$f['item'],
['channel_address' => $original_channel,'url' => $oldbase]