aboutsummaryrefslogtreecommitdiffstats
path: root/include/poller.php
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2013-06-07 03:46:43 +0100
committerThomas Willingham <founder@kakste.com>2013-06-07 03:46:43 +0100
commit466a6d5227fbaf0a36cd76b5603cb42bb1b7462b (patch)
tree395936a63e27fa105e0dc69d13c1b951dc9e9439 /include/poller.php
parentdc6472e046ee6ac0afc934e8ad1edc1e281a3cb0 (diff)
parentc21f8c68e39e22a0348e5717109f0005d4d35809 (diff)
downloadvolse-hubzilla-466a6d5227fbaf0a36cd76b5603cb42bb1b7462b.tar.gz
volse-hubzilla-466a6d5227fbaf0a36cd76b5603cb42bb1b7462b.tar.bz2
volse-hubzilla-466a6d5227fbaf0a36cd76b5603cb42bb1b7462b.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/poller.php')
-rw-r--r--include/poller.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/poller.php b/include/poller.php
index 433bc8caf..dff16d3d7 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -85,6 +85,26 @@ function poller_run($argv, $argc){
proc_run('php','include/expire.php');
}
+ // update any photos which didn't get imported properly
+ // This should be rare
+
+ $r = q("select xchan_photo_l, xchan_hash from xchan where xchan_photo_l != '' and xchan_photo_m = ''
+ and xchan_photo_date < UTC_TIMESTAMP() - INTERVAL 1 DAY");
+ if($r) {
+ require_once('include/photo/photo_driver.php');
+ foreach($r as $rr) {
+ $photos = import_profile_photo($rr['xchan_photo_l'],$rr['xchan_hash']);
+ $x = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s'
+ where xchan_hash = '%s' limit 1",
+ dbesc($photos[0]),
+ dbesc($photos[1]),
+ dbesc($photos[2]),
+ dbesc($photos[3]),
+ dbesc($rr['xchan_hash'])
+ );
+ }
+ }
+
$manual_id = 0;
$generation = 0;