Merge pull request #5622 from annando/forum-storage

Fix for storing posts of private forums
pull/5624/head
Tobias Diekershoff 2018-08-16 09:28:57 +02:00 zatwierdzone przez GitHub
commit 6892e56b3e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -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);