From bb0cf933749cc47eb4a6e7acd2ec324c89a2b5b3 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 15 Aug 2018 20:13:10 +0000 Subject: [PATCH] Fix for storing posts of private forums --- src/Model/Item.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 10526eaabe..b9c88bca86 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2576,11 +2576,12 @@ class Item extends BaseObject $private = ($user['allow_cid'] || $user['allow_gid'] || $user['deny_cid'] || $user['deny_gid']) ? 1 : 0; + $psid = PermissionSet::fetchIDForPost($user); + $forum_mode = ($prvgroup ? 2 : 1); $fields = ['wall' => true, 'origin' => true, 'forum_mode' => $forum_mode, 'contact-id' => $self['id'], - 'owner-id' => $owner_id, 'owner-link' => $self['url'], 'private' => $private, 'allow_cid' => $user['allow_cid'], - 'allow_gid' => $user['allow_gid'], 'deny_cid' => $user['deny_cid'], 'deny_gid' => $user['deny_gid']]; + 'owner-id' => $owner_id, 'private' => $private, 'psid' => $psid]; self::update($fields, ['id' => $item_id]); self::updateThread($item_id);