* Infolog - Preferences to receive notification as member of owner group of Infolog Type

This commit is contained in:
Frédéric Erpicum 2012-02-27 14:59:00 +00:00
parent 2553ad1bcc
commit 354e344a1c
2 changed files with 25 additions and 0 deletions

View File

@ -491,6 +491,20 @@ abstract class bo_tracking
$email_sent[] = $email;
}
// members of group when entry owned by group
if ($this->creator_field && $GLOBALS['egw']->accounts->get_type($data[$this->creator_field]) == 'g')
{
foreach($GLOBALS['egw']->accounts->members($data[$this->creator_field],true) as $u)
{
if (($email = $GLOBALS['egw']->accounts->id2name($u,'account_email')) &&
!in_array($email, $email_sent))
{
$this->send_notification($data,$old,$email,$u,'notify_owner_group_member');
$email_sent[] = $email;
}
}
}
// assigned / responsible users
if ($this->assigned_field)
{

View File

@ -371,6 +371,17 @@ class infolog_hooks
'default'=> '0d', // Same day
);
// receive notification for items owned by groups you are part of
$settings['notify_owner_group_member'] = array(
'type' => 'check',
'label' => 'Receive notifications about items of type owned by groups you are part of',
'name' => 'notify_owner_group_member',
'help' => 'Do you want a notification if items owned by groups you are part of get updated ?',
'xmlrpc' => True,
'admin' => False,
'default'=> '0', // No
);
// Merge print
if ($GLOBALS['egw_info']['user']['apps']['filemanager'])
{