diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index 880f9f785b..491f1a5eae 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -642,6 +642,9 @@ class calendar_boupdate extends calendar_bo } } } + //$currentPrefs = CreateObject('phpgwapi.preferences',$GLOBALS['egw_info']['user']['account_id']); + //$user_prefs = $currentPrefs->read_repository(); + $user_prefs = $GLOBALS['egw_info']['user']['preferences']; foreach($to_notify as $userid => $statusid) { if ($this->debug > 0) error_log(__METHOD__." trying to notify $userid, with $statusid"); @@ -656,7 +659,8 @@ class calendar_boupdate extends calendar_bo { continue; // dont notify rejected participants or groups } - if($userid != $GLOBALS['egw_info']['user']['account_id'] || $msg_type == MSG_ALARM) + + if($userid != $GLOBALS['egw_info']['user']['account_id'] || $user_prefs['calendar']['receive_own_updates']==1 || $msg_type == MSG_ALARM) { $preferences = CreateObject('phpgwapi.preferences',$userid); $part_prefs = $preferences->read_repository(); @@ -1513,4 +1517,4 @@ class calendar_boupdate extends calendar_bo } return false; } -} \ No newline at end of file +} diff --git a/calendar/inc/class.calendar_hooks.inc.php b/calendar/inc/class.calendar_hooks.inc.php index cfec0967d6..83e755eb2e 100644 --- a/calendar/inc/class.calendar_hooks.inc.php +++ b/calendar/inc/class.calendar_hooks.inc.php @@ -167,7 +167,7 @@ class calendar_hooks '5' => lang('Weekview without weekend'), '7' => lang('Weekview with weekend'), ); - $mainpage = array( + $mainpage = $yesno = array( '1' => lang('Yes'), '0' => lang('No'), ); @@ -404,6 +404,16 @@ class calendar_hooks 'admin' => False, 'default'=> 'time_change', ), + 'receive_own_updates' => array( + 'type' => 'select', + 'label' => 'Receive notifications about events you created/modified/deleted', + 'name' => 'receive_own_updates', + 'values' => $yesno, + 'help' => "Do you want to be notified about changes of appointments you modified?", + 'xmlrpc' => True, + 'admin' => False, + 'default'=> 'false', + ), 'update_format' => array( 'type' => 'select', 'label' => 'Format of event updates',