Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport #14157 to the FRAMEWORK_5_2 branch #7

Open
wants to merge 1 commit into
base: FRAMEWORK_5_2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions config/prefs.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@
}
);

$prefGroups['itip'] = array(
'column' => _("Events"),
'label' => _("iTip/Meeting request preferences"),
'desc' => _("Set preferences for dealing with iTip notifications"),
'members' => array('itip_silent')
);

// Show dynamic view?
$_prefs['dynamic_view'] = array(
'value' => 1,
Expand Down Expand Up @@ -531,3 +538,9 @@
->create($GLOBALS['registry']->getAuth())->getAll('id'), array('horde' => _("Use Horde Default"))),
'desc' => _("Choose the identity to use for ActiveSync. This determines the email address used as the ORGANIZER for events you create.")
);

$_prefs['itip_silent'] = array(
'value' => 0,
'type' => 'checkbox',
'desc' => _("If checked, NEVER SEND any iTip messages. This means invitees will NOT receive meeting requests and organizers will NOT receive any messages when an existing meeting is altered.")
);
8 changes: 5 additions & 3 deletions js/kronolith.js
Original file line number Diff line number Diff line change
Expand Up @@ -4541,7 +4541,8 @@ KronolithCore = {
if (!elt.disabled) {
this._checkDate($('kronolithEventStartDate'));
this._checkDate($('kronolithEventEndDate'));
if ($F('kronolithEventAttendees') && $F('kronolithEventId')) {
if ($F('kronolithEventAttendees') && $F('kronolithEventId') &&
!Kronolith.conf.itip_silent) {
$('kronolithEventSendUpdates').setValue(0);
$('kronolithEventDiv').hide();
$('kronolithUpdateDiv').show();
Expand All @@ -4552,7 +4553,7 @@ KronolithCore = {
case 'kronolithEventSendUpdateYes':
if (this.uatts) {
this.uatts.u = true;
} else {
} else if (!Kronolith.conf.itip_silent) {
$('kronolithEventSendUpdates').setValue(1);
}
case 'kronolithEventSendUpdateNo':
Expand Down Expand Up @@ -4655,7 +4656,8 @@ KronolithCore = {

if (id != 'kronolithEventSendCancellationNo'
&& id != 'kronolithEventSendCancellationYes'
&& $F('kronolithEventAttendees')) {
&& $F('kronolithEventAttendees')
&& !Kronolith.conf.itip_silent) {

$('kronolithDeleteDiv').hide();
$('kronolithCancellationDiv').show();
Expand Down
3 changes: 2 additions & 1 deletion lib/Ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ protected function _addBaseVars()
'delegate' => Kronolith::PERMS_DELEGATE
),
'tasks' => $has_tasks ? $registry->tasks->ajaxDefaults() : null,
'confirm_delete' => $prefs->getValue('confirm_delete')
'confirm_delete' => $prefs->getValue('confirm_delete'),
'itip_silent' => $prefs->getValue('itip_silent')
));

/* Make sure this value is not optimized out by array_filter(). */
Expand Down
2 changes: 1 addition & 1 deletion lib/Kronolith.php
Original file line number Diff line number Diff line change
Expand Up @@ -1914,7 +1914,7 @@ static public function sendITipNotifications(
{
global $injector, $registry;

if (!$event->attendees) {
if (!$event->attendees || $GLOBALS['prefs']->getValue('itip_silent')) {
return;
}

Expand Down