"item" is replaced by "post-view" / postupdate check added

This commit is contained in:
Michael 2021-01-17 20:32:13 +00:00
parent d29bad0cb2
commit 4157db5473
28 changed files with 104 additions and 782 deletions

View file

@ -72,9 +72,8 @@ class UserItem
// Add every user who participated so far in this thread
// This can only happen with participations on global items. (means: uid = 0)
$users = DBA::p("SELECT DISTINCT(`contact`.`uid`) FROM `item`
INNER JOIN `contact` ON `contact`.`id` = `item`.`contact-id` AND `contact`.`uid` != 0
WHERE `parent` IN (SELECT `parent` FROM `item` WHERE `id`=?)", $iid);
$users = DBA::p("SELECT DISTINCT(`contact-uid`) AS `uid` FROM `post-view`
WHERE `contact-uid` != 0 AND `parent` IN (SELECT `parent` FROM `post-view` WHERE `id` = ?)", $iid);
while ($user = DBA::fetch($users)) {
$uids[] = $user['uid'];
}