Skip to content

Commit 2820a05

Browse files
committed
Fixing bug when sending a notification to a group (double email received)
1 parent b1b2365 commit 2820a05

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

main/css/base.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2508,7 +2508,7 @@ div.admin_section h4 {
25082508
#container-slider {
25092509
margin: 0 auto;
25102510
min-height: 310px;
2511-
padding: 0 0 0 6%;
2511+
padding: 15px 0 0 6%;
25122512
width: 560px;
25132513
z-index: 0;
25142514
}

main/inc/lib/message.lib.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,10 @@ public static function send_message($receiver_user_id, $subject, $content, $file
300300
} else {
301301
$group_info = GroupPortalManager::get_group_data($group_id);
302302
$user_list = GroupPortalManager::get_users_by_group($group_id, false, array(),0, 1000);
303+
304+
//Adding more sens to the message group
305+
$subject = sprintf(get_lang('ThereIsANewMessageInTheGroupX'), $group_info['name']);
306+
303307
$new_user_list = array();
304308
foreach($user_list as $user_data) {
305309
$new_user_list[]= $user_data['user_id'];

main/social/group_topics.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function hide_icon_edit(element_html) {
101101
$content = $_POST['content'];
102102
$group_id = intval($_POST['group_id']);
103103
$parent_id = intval($_POST['parent_id']);
104-
104+
105105
if ($_POST['action'] == 'reply_message_group') {
106106
$title = cut($content, 50);
107107
}
@@ -119,7 +119,7 @@ function hide_icon_edit(element_html) {
119119
if (is_string($res)) {
120120
Display::display_error_message($res);
121121
}
122-
122+
/*
123123
if (!empty($res)) {
124124
$groups_user = GroupPortalManager::get_users_by_group($group_id);
125125
$group_info = GroupPortalManager::get_group_data($group_id);
@@ -139,7 +139,7 @@ function hide_icon_edit(element_html) {
139139
$recipient_email = $group_user_info['mail'];
140140
@api_mail_html($recipient_name, $recipient_email, stripslashes($subject), $message, $sender_name, $sender_email);
141141
}
142-
}
142+
} */
143143
$topic_id = intval($_GET['topic_id']);
144144
if ($_POST['action'] == 'add_message_group') {
145145
$topic_id = $res;

0 commit comments

Comments
 (0)