Browse Source

Bugfix: The Distribition of public items failed with comments# Bitte geben Sie eine Commit-Beschreibung für Ihre Änderungen ein. Zeilen,

pull/4933/head
Michael 3 years ago
parent
commit
da3658c80d
1 changed files with 14 additions and 1 deletions
  1. +14
    -1
      src/Model/Item.php

+ 14
- 1
src/Model/Item.php View File

@ -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…
Cancel
Save