mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
silence some warnings on mail-to-all-participants
This commit is contained in:
parent
ac18b6cc8d
commit
00881d1c94
@ -1500,10 +1500,11 @@ class calendar_bo
|
||||
*/
|
||||
function participants($event,$long_status=false,$show_group_invitation=false)
|
||||
{
|
||||
//_debug_array($event);
|
||||
//error_log(__METHOD__.__LINE__.array2string($event['participants']));
|
||||
$names = array();
|
||||
foreach((array)$event['participants'] as $id => $status)
|
||||
{
|
||||
if (!is_string($status)) continue;
|
||||
calendar_so::split_status($status,$quantity,$role);
|
||||
|
||||
if ($status == 'G' && !$show_group_invitation) continue; // dont show group-invitation
|
||||
|
@ -1758,7 +1758,7 @@ class calendar_boupdate extends calendar_bo
|
||||
'data' => $event['public'] ? lang('Public') : lang('Private')
|
||||
);
|
||||
|
||||
if (isset($event['participants']) && is_array($event['participants']))
|
||||
if (isset($event['participants']) && is_array($event['participants']) && !empty($event['participants']))
|
||||
{
|
||||
$participants = $this->participants($event,true);
|
||||
}
|
||||
|
@ -1506,8 +1506,8 @@ ORDER BY cal_user_type, cal_usre_id
|
||||
{
|
||||
$quantity = 1;
|
||||
$role = 'REQ-PARTICIPANT';
|
||||
|
||||
if (strlen($status) > 1 && preg_match('/^.([0-9]*)(.*)$/',$status,$matches))
|
||||
//error_log(__METHOD__.__LINE__.array2string($status));
|
||||
if (is_string($status) && strlen($status) > 1 && preg_match('/^.([0-9]*)(.*)$/',$status,$matches))
|
||||
{
|
||||
if ((int)$matches[1] > 0) $quantity = (int)$matches[1];
|
||||
if ($matches[2]) $role = $matches[2];
|
||||
|
@ -272,7 +272,15 @@ class calendar_ui
|
||||
if (isset($_REQUEST['json_data']) && ($json_data = json_decode($_REQUEST['json_data'], true)) &&
|
||||
!empty($json_data['request']['parameters'][0]))
|
||||
{
|
||||
parse_str(substr($json_data['request']['parameters'][0], 10), $set_states); // cut off "/index.php?"
|
||||
if (is_array($json_data['request']['parameters'][0]))
|
||||
{
|
||||
//error_log(__METHOD__.__LINE__.array2string($json_data['request']['parameters'][0]));
|
||||
$set_states = $json_data['request']['parameters'][0];
|
||||
}
|
||||
else
|
||||
{
|
||||
parse_str(substr($json_data['request']['parameters'][0], 10), $set_states); // cut off "/index.php?"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -993,7 +993,7 @@ class calendar_uiforms extends calendar_ui
|
||||
}
|
||||
|
||||
/**
|
||||
* return javascript to open felamimail compose window with preset content to mail all participants
|
||||
* return javascript to open mail compose window with preset content to mail all participants
|
||||
*
|
||||
* @param array $event
|
||||
* @param boolean $added
|
||||
@ -1006,9 +1006,9 @@ class calendar_uiforms extends calendar_ui
|
||||
foreach($event['participants'] as $uid => $status)
|
||||
{
|
||||
$toadd = '';
|
||||
if ($status['status'] == 'R' || $status['uid'] == $this->user) continue;
|
||||
if ((isset($status['status']) && $status['status'] == 'R') || (isset($status['uid']) && $status['uid'] == $this->user)) continue;
|
||||
|
||||
if (is_numeric($status['uid']) && $GLOBALS['egw']->accounts->get_type($status['uid']) == 'u')
|
||||
if (isset($status['uid']) && is_numeric($status['uid']) && $GLOBALS['egw']->accounts->get_type($status['uid']) == 'u')
|
||||
{
|
||||
if (!($email = $GLOBALS['egw']->accounts->id2name($status['uid'],'account_email'))) continue;
|
||||
|
||||
@ -1036,7 +1036,7 @@ class calendar_uiforms extends calendar_ui
|
||||
}
|
||||
}
|
||||
list($subject,$body) = $this->bo->get_update_message($event,$added ? MSG_ADDED : MSG_MODIFIED); // update-message is in TZ of the user
|
||||
#error_log(__METHOD__.print_r($event,true));
|
||||
//error_log(__METHOD__.print_r($event,true));
|
||||
$boical = new calendar_ical();
|
||||
// we need to pass $event[id] so iCal class reads event again,
|
||||
// as event is in user TZ, but iCal class expects server TZ!
|
||||
@ -1501,7 +1501,7 @@ class calendar_uiforms extends calendar_ui
|
||||
'history' => !$event['id'],
|
||||
'alarms' => $readonlys['tabs']['alarms'],
|
||||
);
|
||||
if (!isset($GLOBALS['egw_info']['user']['apps']['felamimail'])) // no mail without mail-app
|
||||
if (!isset($GLOBALS['egw_info']['user']['apps']['mail'])) // no mail without mail-app
|
||||
{
|
||||
unset($sel_options['action']['mail']);
|
||||
unset($sel_options['action']['sendmeetingrequest']);
|
||||
|
Loading…
Reference in New Issue
Block a user