Message sent to removed autocompleted recipient
-
Hi,
I have autocomplete on searching all members in the message component via wp-config
`define( ‘BP_MESSAGES_AUTOCOMPLETE_ALL’, true );`When composing a new message I can reproduce this error :
1) type first part of name. A list of users is shown.
2) Choose user A.
3) type first part of another name. A list of users is shown.
4) Choose user B.
5) Remove one of the recipients (A or B). Only one recipient is listed as should be the case.
6) Compose message and send.Both user A and B recieve the message.
I have tried to take a look at the code and have found the following :
In `bp-messages/bp-messages-screens.php`
The recipients are stored in these two variables
`$autocomplete_recipients = explode( ‘,’, $_POST['send-to-input'] );
$typed_recipients = explode( ‘ ‘, $_POST['send_to_usernames'] );
`In `/bp-messages/js/autocomplete/jquery.autocompletefb.js` the user should be removed by
`
40 removeUsername: function(o){
41 var newID = o.parentNode.id.split(‘-’);
42 jQuery(‘#send-to-usernames’).removeClass(newID[1]);
43 }
`
but it isn’t.Perhaps, this is caused by `split()` being deprecated as of PHP 5.3,
http://dk1.php.net/manual/en/function.split.php
but I don’t know.Any ideas much appreciated!
Cheers
Mort3n
You must be logged in to reply to this topic.