diff options
author | Friendika <info@friendika.com> | 2011-08-28 23:01:42 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-08-28 23:01:42 -0700 |
commit | 88e6e4699a89a0f17799af44e4a085fe28efeb81 (patch) | |
tree | eefe425583d1d53ac0b0b60aef20e73db5a867ee /include/delivery.php | |
parent | 51615f57acbdf5ff282037ba3c8e6a454127ea2c (diff) | |
parent | b61d535f81af4c2ec2bcabd4378f1a8bfa3cd446 (diff) | |
download | volse-hubzilla-88e6e4699a89a0f17799af44e4a085fe28efeb81.tar.gz volse-hubzilla-88e6e4699a89a0f17799af44e4a085fe28efeb81.tar.bz2 volse-hubzilla-88e6e4699a89a0f17799af44e4a085fe28efeb81.zip |
Merge branch 'pull'
Diffstat (limited to 'include/delivery.php')
-rw-r--r-- | include/delivery.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/delivery.php b/include/delivery.php index 4b85a9ad1..5d81228ee 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -37,6 +37,19 @@ function delivery_run($argv, $argc){ $item_id = intval($argv[2]); $contact_id = intval($argv[3]); + // Some other process may have delivered this item already. + + $r = q("select * from deliverq where cmd = '%s' and item = %d and contact = %d limit 1", + dbesc($cmd), + dbesc($item_id), + dbesc($contact_id) + ); + if(! count($r)) { + return; + } + + // It's ours to deliver. Remove it from the queue. + q("delete from deliverq where cmd = '%s' and item = %d and contact = %d limit 1", dbesc($cmd), dbesc($item_id), |