aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-06-04 01:37:50 -0700
committerfriendica <info@friendica.com>2014-06-04 01:37:50 -0700
commitd84f03d59b4b3f625b36852211698f5606b6b37c (patch)
treec6be2e0c202c7dd8cab1613a3321dff6504613e2
parent424f23858ef10066d913db5ada45786f1beaea29 (diff)
downloadvolse-hubzilla-d84f03d59b4b3f625b36852211698f5606b6b37c.tar.gz
volse-hubzilla-d84f03d59b4b3f625b36852211698f5606b6b37c.tar.bz2
volse-hubzilla-d84f03d59b4b3f625b36852211698f5606b6b37c.zip
if photo import failed during channel import, reset the xchan_photo_date so it will automatically fix itself.
-rw-r--r--mod/import.php8
-rw-r--r--version.inc2
2 files changed, 8 insertions, 2 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)
);
diff --git a/version.inc b/version.inc
index 30620af00..1bedfc22b 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2014-06-03.695
+2014-06-04.696