diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index da4bb235c8..04774b2ff6 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-04-04 Vanessa Gil + + * include/functions_messages.php: Fixed bug duplicate + sent messages. + 2012-04-04 Dario Rodriguez * godmode/menu.php: Fixed a problem with menu link. diff --git a/pandora_console/include/functions_messages.php b/pandora_console/include/functions_messages.php index 7c404643ad..1f3998331d 100644 --- a/pandora_console/include/functions_messages.php +++ b/pandora_console/include/functions_messages.php @@ -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