mirror of
https://github.com/friendica/friendica
synced 2025-04-26 21:50:11 +00:00
New item functions are now used in the delivery process as well
This commit is contained in:
parent
e42b934807
commit
23aa9dffa0
3 changed files with 25 additions and 28 deletions
|
@ -59,14 +59,10 @@ class Delivery extends BaseObject
|
|||
}
|
||||
$parent_id = intval($item['parent']);
|
||||
|
||||
$itemdata = dba::p("SELECT `item`.*, `contact`.`uid` AS `cuid`,
|
||||
`sign`.`signed_text`,`sign`.`signature`,`sign`.`signer`
|
||||
FROM `item`
|
||||
INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
|
||||
LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id`
|
||||
WHERE `item`.`id` IN (?, ?) AND `visible` AND NOT `moderated`
|
||||
ORDER BY `item`.`id`",
|
||||
$item_id, $parent_id);
|
||||
$condition = ['id' => [$item_id, $parent_id], 'visible' => true, 'moderated' => false];
|
||||
$params = ['order' => ['id']];
|
||||
$itemdata = Item::select([], $condition, $params);
|
||||
|
||||
$items = [];
|
||||
while ($item = dba::fetch($itemdata)) {
|
||||
if ($item['id'] == $parent_id) {
|
||||
|
@ -79,7 +75,7 @@ class Delivery extends BaseObject
|
|||
}
|
||||
dba::close($itemdata);
|
||||
|
||||
$uid = $target_item['cuid'];
|
||||
$uid = $target_item['contact-uid'];
|
||||
|
||||
// avoid race condition with deleting entries
|
||||
if ($items[0]['deleted']) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue