From 345b0d81dd4db30a4de339df3e55b2c409ef521f Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 14 Sep 2015 23:14:21 +0200 Subject: [PATCH] Picture import from Diaspora often failed --- include/dsprphotoq.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/dsprphotoq.php b/include/dsprphotoq.php index 7e252cd843..0d8088d4bd 100644 --- a/include/dsprphotoq.php +++ b/include/dsprphotoq.php @@ -28,9 +28,14 @@ function dsprphotoq_run($argv, $argc){ foreach($dphotos as $dphoto) { - $r = q("SELECT * FROM user WHERE uid = %d", - intval($dphoto['uid']) - ); + $r = array(); + + if ($dphoto['uid'] == 0) + $r[0] = array("uid" => 0, "page-flags" => PAGE_FREELOVE); + else + $r = q("SELECT * FROM user WHERE uid = %d", + intval($dphoto['uid'])); + if(!$r) { logger("diaspora photo queue: user " . $dphoto['uid'] . " not found"); return; -- 2.39.5