Fixing "Unknown column 'network-thread-view.uri-id'"
authorMichael <heluecht@pirati.ca>
Sat, 2 Oct 2021 20:56:11 +0000 (20:56 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 2 Oct 2021 20:56:11 +0000 (20:56 +0000)
src/Module/Conversation/Network.php

index 3585d52ed2a0ae59b5a2a36ccbbaa5a5d1773326..ba73ec6b64edf5ce663207d79ee3c22b860eeb0f 100644 (file)
@@ -382,7 +382,7 @@ class Network extends BaseModule
                        $conditionStrings = DBA::mergeConditions($conditionStrings, ["`contact-id` IN (SELECT `contact-id` FROM `group_member` WHERE `gid` = ?)", self::$groupId]);
                } elseif (self::$forumContactId) {
                        $conditionStrings = DBA::mergeConditions($conditionStrings, 
-                               ["((`contact-id` = ?) OR EXISTS(SELECT `uri-id` FROM `post-user-view` WHERE `post-user-view`.`parent-uri-id` = `network-thread-view`.`uri-id` AND (`contact-id` = ? AND `gravity` = ? AND `vid` = ? AND `uid` = ?)))",
+                               ["((`contact-id` = ?) OR EXISTS(SELECT `uri-id` FROM `post-user-view` WHERE `post-user-view`.`parent-uri-id` = `" . $table . "`.`uri-id` AND (`contact-id` = ? AND `gravity` = ? AND `vid` = ? AND `uid` = ?)))",
                                self::$forumContactId, self::$forumContactId, GRAVITY_ACTIVITY, Verb::getID(Activity::ANNOUNCE), local_user()]);
                }