diff options
author | Paolo T <tuscanhobbit@users.noreply.github.com> | 2014-09-02 13:15:59 +0200 |
---|---|---|
committer | Paolo T <tuscanhobbit@users.noreply.github.com> | 2014-09-02 13:15:59 +0200 |
commit | fee5b6bd1599599da2f3b662f04b9651b23fb4e4 (patch) | |
tree | e4ab47f657ce1e6ae0aabf6be51bdf169e4b389d /include/deliver.php | |
parent | a1f85cda3ec0e6fc1c661ee12b1e7d87b3f242c5 (diff) | |
parent | 9dac46ca25b11f80dded42db31e7e062fc7b5142 (diff) | |
download | volse-hubzilla-fee5b6bd1599599da2f3b662f04b9651b23fb4e4.tar.gz volse-hubzilla-fee5b6bd1599599da2f3b662f04b9651b23fb4e4.tar.bz2 volse-hubzilla-fee5b6bd1599599da2f3b662f04b9651b23fb4e4.zip |
Merge pull request #2 from friendica/master
Merge from main project
Diffstat (limited to 'include/deliver.php')
-rw-r--r-- | include/deliver.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/deliver.php b/include/deliver.php index 0ad008c23..f4fae6061 100644 --- a/include/deliver.php +++ b/include/deliver.php @@ -20,6 +20,24 @@ function deliver_run($argv, $argc) { dbesc($argv[$x]) ); if($r) { + if($r[0]['outq_driver'] === 'post') { + $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); + $y = q("delete from outq where outq_hash = '%s' limit 1", + dbesc($argv[$x]) + ); + } + else { + logger('deliver: queue post returned ' . $result['return_code'] . ' from ' . $r[0]['outq_posturl'],LOGGER_DEBUG); + $y = q("update outq set outq_updated = '%s' where outq_hash = '%s' limit 1", + dbesc(datetime_convert()), + dbesc($argv[$x]) + ); + } + continue; + } + if($r[0]['outq_posturl'] === z_root() . '/post') { logger('deliver: local delivery', LOGGER_DEBUG); // local delivery |