aboutsummaryrefslogtreecommitdiffstats
path: root/include/import.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-12-31 14:45:42 -0800
committerMario <mario@mariovavti.com>2018-01-03 12:16:05 +0100
commit301e5383c7d524ca7cbcfd8e65b02f7b3591fc75 (patch)
tree0867c6a5e37c40f1ed222335f7ac43e8839a8be8 /include/import.php
parent66d0b4d0d57d98540e36e3a9f6fa5ccd84ea5ff9 (diff)
downloadvolse-hubzilla-301e5383c7d524ca7cbcfd8e65b02f7b3591fc75.tar.gz
volse-hubzilla-301e5383c7d524ca7cbcfd8e65b02f7b3591fc75.tar.bz2
volse-hubzilla-301e5383c7d524ca7cbcfd8e65b02f7b3591fc75.zip
this should finish up hubzilla issue #113
Diffstat (limited to 'include/import.php')
-rw-r--r--include/import.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/import.php b/include/import.php
index 496bcd89e..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);
}