1
0
Fork 0

Merge pull request #9222 from annando/issue-8958

Issue 8958: Ensure to have no foreign key violation
This commit is contained in:
Hypolite Petovan 2020-09-17 15:47:42 -04:00 committed by GitHub
commit 0f1bab6fea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,6 +52,7 @@ class MergeContact
// These fields only contain public contact entries (uid = 0)
if ($uid == 0) {
DBA::update('post-tag', ['cid' => $new_cid], ['cid' => $old_cid]);
DBA::delete('post-tag', ['cid' => $old_cid]);
DBA::update('item', ['author-id' => $new_cid], ['author-id' => $old_cid]);
DBA::update('item', ['owner-id' => $new_cid], ['owner-id' => $old_cid]);
DBA::update('thread', ['author-id' => $new_cid], ['author-id' => $old_cid]);