Comment duplicate keys in xchan_change_key func

PHP arrays can't have duplicate keys, so adding an entry with the same
key again will replace the existing entry with the later one. This patch
comment out the entries that in any case are replaced, so functionally
it should be equivalent to what was before. (But still probably wrong!)
This commit is contained in:
Harald Eilertsen
2025-09-10 19:01:58 +02:00
parent a7e734b700
commit 176a7cb9b5

View File

@@ -228,11 +228,13 @@ function xchan_change_key($oldx,$newx,$data) {
'chat' => 'chat_xchan',
'chatpresence' => 'cp_xchan',
'event' => 'event_xchan',
'item' => 'owner_xchan',
'item' => 'author_xchan',
// PHP Arrays can't have duplicate keys.
// 'item' => 'owner_xchan',
// 'item' => 'author_xchan',
'item' => 'source_xchan',
'shares' => 'share_xchan',
'source' => 'src_channel_xchan',
// PHP Arrays can't have duplicate keys.
// 'source' => 'src_channel_xchan',
'source' => 'src_xchan',
'xchat' => 'xchat_xchan',
'xconfig' => 'xchan',