Bugfix: The Distribition of public items failed with comments# Bitte geben Sie eine Commit-Beschreibung für Ihre Änderungen ein. Zeilen,
This commit is contained in:
parent
a9f1f47be2
commit
da3658c80d
|
@ -863,11 +863,24 @@ class Item extends BaseObject
|
|||
|
||||
unset($item['id']);
|
||||
|
||||
$users = [];
|
||||
|
||||
$condition = ["`nurl` IN (SELECT `nurl` FROM `contact` WHERE `id` = ?) AND `uid` != 0 AND NOT `blocked` AND NOT `readonly` AND `rel` IN (?, ?)",
|
||||
$parent['owner-id'], CONTACT_IS_SHARING, CONTACT_IS_FRIEND];
|
||||
$contacts = dba::select('contact', ['uid'], $condition);
|
||||
while ($contact = dba::fetch($contacts)) {
|
||||
self::storeForUser($itemid, $item, $contact['uid']);
|
||||
$users[$contact['uid']] = $contact['uid'];
|
||||
}
|
||||
|
||||
if ($item['uri'] != $item['parent-uri']) {
|
||||
$parents = dba::select('item', ['uid'], ["`uri` = ? AND `uid` != 0", $item['parent-uri']]);
|
||||
while ($parent = dba::fetch($parents)) {
|
||||
$users[$parent['uid']] = $parent['uid'];
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($users as $uid) {
|
||||
self::storeForUser($itemid, $item, $uid);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user