feature to enable to be notified of events you created/modified/deleted yourself; That is most helpful if you get a notification eMail with the ics attached, and thus be able to import the event somewhere else (another EGroupware/Outlook/...)

This commit is contained in:
Klaus Leithoff 2010-03-03 11:59:55 +00:00
parent 62c6359c0b
commit f093aeff24
2 changed files with 17 additions and 3 deletions

View File

@ -658,6 +658,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");
@ -672,7 +675,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();
@ -2120,4 +2124,4 @@ class calendar_boupdate extends calendar_bo
}
}
}
}
}

View File

@ -168,7 +168,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'),
);
@ -405,6 +405,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',