]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/UserItem.php
Fix the test data / unused function removed
[friendica.git] / src / Model / UserItem.php
index 2755bbb40192201415038438e16324fb107a6456..0cc3f618975b3948cb47b02db4fc60fec619da02 100644 (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'];
                }