if photo import failed during channel import, reset the xchan_photo_date so it will automatically fix itself.
This commit is contained in:
parent
424f23858e
commit
d84f03d59b
@ -254,12 +254,18 @@ function import_post(&$a) {
|
|||||||
|
|
||||||
require_once('include/photo/photo_driver.php');
|
require_once('include/photo/photo_driver.php');
|
||||||
$photos = import_profile_photo($xchan['xchan_photo_l'],$xchan['xchan_hash']);
|
$photos = import_profile_photo($xchan['xchan_photo_l'],$xchan['xchan_hash']);
|
||||||
$r = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s'
|
if($photos[4])
|
||||||
|
$photodate = '0000-00-00 00:00:00';
|
||||||
|
else
|
||||||
|
$photodate = $xchan['xchan_photo_date'];
|
||||||
|
|
||||||
|
$r = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s', xchan_photo_date = '%s'
|
||||||
where xchan_hash = '%s' limit 1",
|
where xchan_hash = '%s' limit 1",
|
||||||
dbesc($photos[0]),
|
dbesc($photos[0]),
|
||||||
dbesc($photos[1]),
|
dbesc($photos[1]),
|
||||||
dbesc($photos[2]),
|
dbesc($photos[2]),
|
||||||
dbesc($photos[3]),
|
dbesc($photos[3]),
|
||||||
|
dbesc($photodate),
|
||||||
dbesc($xchan_hash)
|
dbesc($xchan_hash)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
2014-06-03.695
|
2014-06-04.696
|
||||||
|
Reference in New Issue
Block a user