From 52557b011d2c05e83b1df91d2d766317dd2c5223 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 29 Sep 2011 21:56:44 -0700 Subject: possible sql errors --- include/delivery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/delivery.php') diff --git a/include/delivery.php b/include/delivery.php index 06cc1f679..3ab820b62 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -72,7 +72,7 @@ function delivery_run($argv, $argc){ $normal_mode = false; $expire = true; $items = q("SELECT * FROM `item` WHERE `uid` = %d AND `wall` = 1 - AND `deleted` = 1 AND `changed` > UTC_TIMESTAMP - INTERVAL 30 MINUTE", + AND `deleted` = 1 AND `changed` > UTC_TIMESTAMP() - INTERVAL 30 MINUTE", intval($item_id) ); $uid = $item_id; -- cgit v1.2.3 From 7c1968907d26a66581d362475a6b557e53e159cb Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 2 Oct 2011 05:32:05 -0700 Subject: attack of the zombie orphans --- include/delivery.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/delivery.php') diff --git a/include/delivery.php b/include/delivery.php index 3ab820b62..46112d78e 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -96,6 +96,8 @@ function delivery_run($argv, $argc){ $uid = $r[0]['uid']; $updated = $r[0]['edited']; + if(! $parent_id) + return; $items = q("SELECT `item`.*, `sign`.`signed_text`,`sign`.`signature`,`sign`.`signer` -- cgit v1.2.3 From 7b648e6da85ece5b402dfce6d546f5711bc63bea Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 4 Oct 2011 18:53:56 -0700 Subject: performance enhancements --- include/delivery.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/delivery.php') diff --git a/include/delivery.php b/include/delivery.php index 46112d78e..e06db6d97 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -123,7 +123,6 @@ function delivery_run($argv, $argc){ if( ! ($icontacts && count($icontacts))) return; - // avoid race condition with deleting entries if($items[0]['deleted']) { @@ -269,7 +268,12 @@ function delivery_run($argv, $argc){ if(! $item_contact) continue; - $atom .= atom_entry($item,'text',$item_contact,$owner,true); + if($normal_mode) { + if($item_id == $item['id']) + $atom .= atom_entry($item,'text',$item_contact,$owner,true); + } + else + $atom .= atom_entry($item,'text',$item_contact,$owner,true); } -- cgit v1.2.3 From ab5052197137b1fbf069f3791c75d6163c569bc0 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 4 Oct 2011 22:00:45 -0700 Subject: yikes --- include/delivery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/delivery.php') diff --git a/include/delivery.php b/include/delivery.php index e06db6d97..1ba1d9c3a 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -269,7 +269,7 @@ function delivery_run($argv, $argc){ continue; if($normal_mode) { - if($item_id == $item['id']) + if($item_id == $item['id'] || $item['id'] == $item['parent']) $atom .= atom_entry($item,'text',$item_contact,$owner,true); } else -- cgit v1.2.3