2012-04-04 Vanessa Gil <vanessa.gil@artica.es>

* include/functions_messages.php: Fixed bug duplicate
	sent messages.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5894 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2012-04-04 11:40:34 +00:00
parent 45792f8f69
commit 57e54397a9
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2012-04-04 Vanessa Gil <vanessa.gil@artica.es>
* include/functions_messages.php: Fixed bug duplicate
sent messages.
2012-04-04 Dario Rodriguez <dario.rodriguez@artica.es>
* godmode/menu.php: Fixed a problem with menu link.

View File

@ -82,7 +82,16 @@ function messages_create_group ($usuario_origen, $dest_group, $subject, $mensaje
//Start transaction so that if it fails somewhere along the way, we roll back
db_process_sql_begin ();
// array unique
foreach ($group_users as $user) {
foreach ($user as $key=>$us) {
if ($key == 'id_user') {
$group_user[$us] = $us;
}
}
}
foreach ($group_user as $user) {
$return = messages_create_message ($usuario_origen, get_user_id ($user), $subject, $mensaje);
if ($return === false) {
//Error sending message, rollback and return false