Skip to content

Commit

Permalink
Don't send announcements to all users by default see #2222
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Dec 19, 2017
1 parent e0fcaab commit 6f603d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main/announcements/announcements.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
$form->addHeader($form_name);
$form->addButtonAdvancedSettings(
'choose_recipients',
[get_lang('ChooseRecipients'), get_lang('AnnouncementChooseRecipientsDescription')]
[get_lang('ChooseRecipients')]
);
$form->addHtml('<div id="choose_recipients_options" style="display:none;">');

Expand Down Expand Up @@ -531,7 +531,7 @@

$form->addElement('file', 'user_upload', get_lang('AddAnAttachment'));
$form->addElement('textarea', 'file_comment', get_lang('FileComment'));
$form->addElement('hidden', 'sec_token', $token);
$form->addHidden('sec_token', $token);

if (empty($sessionId)) {
$form->addCheckBox('send_to_users_in_session', null, get_lang('SendToUsersInSessions'));
Expand All @@ -548,7 +548,7 @@

if ($form->validate()) {
$data = $form->getSubmitValues();
$data['users'] = isset($data['users']) ? $data['users'] : ['everyone'];
$data['users'] = isset($data['users']) ? $data['users'] : [];
$sendToUsersInSession = isset($data['send_to_users_in_session']) ? true : false;

if (isset($id) && $id) {
Expand Down

0 comments on commit 6f603d4

Please sign in to comment.