import: special handling required for channel photo in the xchan record when not seizing 'primary'
This commit is contained in:
parent
40e747ecde
commit
f571b753b6
@ -278,6 +278,16 @@ class Import extends \Zotlabs\Web\Controller {
|
|||||||
create_table_from_array('xchan',$xchan);
|
create_table_from_array('xchan',$xchan);
|
||||||
|
|
||||||
require_once('include/photo/photo_driver.php');
|
require_once('include/photo/photo_driver.php');
|
||||||
|
|
||||||
|
if($xchan['xchan_hash'] === $channel['channel_hash']) {
|
||||||
|
$r = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s' where xchan_hash = '%s'",
|
||||||
|
dbesc(z_root() . '/photo/profile/l/' . $channel['channel_id']),
|
||||||
|
dbesc(z_root() . '/photo/profile/m/' . $channel['channel_id']),
|
||||||
|
dbesc(z_root() . '/photo/profile/s/' . $channel['channel_id']),
|
||||||
|
dbesc($xchan['xchan_hash'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
$photos = import_xchan_photo($xchan['xchan_photo_l'],$xchan['xchan_hash']);
|
$photos = import_xchan_photo($xchan['xchan_photo_l'],$xchan['xchan_hash']);
|
||||||
if($photos[4])
|
if($photos[4])
|
||||||
$photodate = NULL_DATE;
|
$photodate = NULL_DATE;
|
||||||
@ -293,6 +303,7 @@ class Import extends \Zotlabs\Web\Controller {
|
|||||||
dbesc($xchan['xchan_hash'])
|
dbesc($xchan['xchan_hash'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
logger('import step 7');
|
logger('import step 7');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user