diff options
author | mrjive <mrjive@mrjive.it> | 2015-10-02 09:45:03 +0200 |
---|---|---|
committer | mrjive <mrjive@mrjive.it> | 2015-10-02 09:45:03 +0200 |
commit | 32522b61f235266384c81c0669fceaf58afeb4fe (patch) | |
tree | 48427e8f48421b3bb8f344d85f2ebfe1271ea34e /include/deliver.php | |
parent | 11c1573b55f278a664a90a2872d06a40b3ac3026 (diff) | |
parent | 1da3828a09485a9b2bc6113cbab9ca9ca483ffc0 (diff) | |
download | volse-hubzilla-32522b61f235266384c81c0669fceaf58afeb4fe.tar.gz volse-hubzilla-32522b61f235266384c81c0669fceaf58afeb4fe.tar.bz2 volse-hubzilla-32522b61f235266384c81c0669fceaf58afeb4fe.zip |
Merge pull request #6 from redmatrix/master
updating from original codebase
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]) |