diff options
Diffstat (limited to 'include/deliver.php')
-rw-r--r-- | include/deliver.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/deliver.php b/include/deliver.php index 86fc90b3f..a338d1a89 100644 --- a/include/deliver.php +++ b/include/deliver.php @@ -29,6 +29,8 @@ function deliver_run($argv, $argc) { * If not, reduce the outq_priority. */ + $base = ''; + $h = parse_url($r[0]['outq_posturl']); if($h) { $base = $h['scheme'] . '://' . $h['host'] . (($h['port']) ? ':' . $h['port'] : ''); @@ -76,11 +78,13 @@ function deliver_run($argv, $argc) { $result = z_post_url($r[0]['outq_posturl'],$r[0]['outq_msg']); if($result['success'] && $result['return_code'] < 300) { logger('deliver: queue post success to ' . $r[0]['outq_posturl'], LOGGER_DEBUG); - q("update site set site_update = '%s', site_dead = 0 where site_url = '%s' ", - dbesc(datetime_convert()), - dbesc($site_url) - ); - q("update dreport set status = '%s', dreport_time = '%s' where dreport_queue = '%s' limit 1", + if($base) { + q("update site set site_update = '%s', site_dead = 0 where site_url = '%s' ", + dbesc(datetime_convert()), + dbesc($base) + ); + } + q("update dreport set dreport_result = '%s', dreport_time = '%s' where dreport_queue = '%s' limit 1", dbesc('accepted for delivery'), dbesc(datetime_convert()), dbesc($argv[$x]) |