diff options
author | jeroenpraat <jeroenpraat@xs4all.nl> | 2014-06-04 14:00:08 +0000 |
---|---|---|
committer | jeroenpraat <jeroenpraat@xs4all.nl> | 2014-06-04 14:00:08 +0000 |
commit | d9688e5ab3bb1c33e432a14ac3455ecb7ca3a6b2 (patch) | |
tree | cd0a06052eb398d0401ca61314d9db8a6ce91599 /mod/import.php | |
parent | 5869836180d8721363294c5d8dbe64d6b54571c6 (diff) | |
parent | d84f03d59b4b3f625b36852211698f5606b6b37c (diff) | |
download | volse-hubzilla-d9688e5ab3bb1c33e432a14ac3455ecb7ca3a6b2.tar.gz volse-hubzilla-d9688e5ab3bb1c33e432a14ac3455ecb7ca3a6b2.tar.bz2 volse-hubzilla-d9688e5ab3bb1c33e432a14ac3455ecb7ca3a6b2.zip |
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'mod/import.php')
-rw-r--r-- | mod/import.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mod/import.php b/mod/import.php index 5b3b53156..d3b237c3a 100644 --- a/mod/import.php +++ b/mod/import.php @@ -254,12 +254,18 @@ function import_post(&$a) { require_once('include/photo/photo_driver.php'); $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", dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]), dbesc($photos[3]), + dbesc($photodate), dbesc($xchan_hash) ); |