From bd85babc3e02a599e6937e3bbc65f30b41d22335 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 2 Oct 2021 20:56:11 +0000 Subject: [PATCH 1/2] Fixing "Unknown column 'network-thread-view.uri-id'" --- src/Module/Conversation/Network.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Module/Conversation/Network.php b/src/Module/Conversation/Network.php index 3585d52ed..ba73ec6b6 100644 --- a/src/Module/Conversation/Network.php +++ b/src/Module/Conversation/Network.php @@ -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()]); } From fc9ac0ff4611e1d2eecd830947e095c931e49fea Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 2 Oct 2021 23:18:54 +0200 Subject: [PATCH 2/2] Update src/Module/Conversation/Network.php Co-authored-by: Hypolite Petovan --- src/Module/Conversation/Network.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Module/Conversation/Network.php b/src/Module/Conversation/Network.php index ba73ec6b6..405e3772d 100644 --- a/src/Module/Conversation/Network.php +++ b/src/Module/Conversation/Network.php @@ -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` = `" . $table . "`.`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` = " . DBA::quoteIdentifier($table) . ".`uri-id` AND (`contact-id` = ? AND `gravity` = ? AND `vid` = ? AND `uid` = ?)))", self::$forumContactId, self::$forumContactId, GRAVITY_ACTIVITY, Verb::getID(Activity::ANNOUNCE), local_user()]); }