mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-05 04:49:44 +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)
|
function participants($event,$long_status=false,$show_group_invitation=false)
|
||||||
{
|
{
|
||||||
//_debug_array($event);
|
//error_log(__METHOD__.__LINE__.array2string($event['participants']));
|
||||||
$names = array();
|
$names = array();
|
||||||
foreach((array)$event['participants'] as $id => $status)
|
foreach((array)$event['participants'] as $id => $status)
|
||||||
{
|
{
|
||||||
|
if (!is_string($status)) continue;
|
||||||
calendar_so::split_status($status,$quantity,$role);
|
calendar_so::split_status($status,$quantity,$role);
|
||||||
|
|
||||||
if ($status == 'G' && !$show_group_invitation) continue; // dont show group-invitation
|
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')
|
'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);
|
$participants = $this->participants($event,true);
|
||||||
}
|
}
|
||||||
|
@ -1506,8 +1506,8 @@ ORDER BY cal_user_type, cal_usre_id
|
|||||||
{
|
{
|
||||||
$quantity = 1;
|
$quantity = 1;
|
||||||
$role = 'REQ-PARTICIPANT';
|
$role = 'REQ-PARTICIPANT';
|
||||||
|
//error_log(__METHOD__.__LINE__.array2string($status));
|
||||||
if (strlen($status) > 1 && preg_match('/^.([0-9]*)(.*)$/',$status,$matches))
|
if (is_string($status) && strlen($status) > 1 && preg_match('/^.([0-9]*)(.*)$/',$status,$matches))
|
||||||
{
|
{
|
||||||
if ((int)$matches[1] > 0) $quantity = (int)$matches[1];
|
if ((int)$matches[1] > 0) $quantity = (int)$matches[1];
|
||||||
if ($matches[2]) $role = $matches[2];
|
if ($matches[2]) $role = $matches[2];
|
||||||
|
@ -271,9 +271,17 @@ class calendar_ui
|
|||||||
// ajax-exec call has get-parameter in some json
|
// ajax-exec call has get-parameter in some json
|
||||||
if (isset($_REQUEST['json_data']) && ($json_data = json_decode($_REQUEST['json_data'], true)) &&
|
if (isset($_REQUEST['json_data']) && ($json_data = json_decode($_REQUEST['json_data'], true)) &&
|
||||||
!empty($json_data['request']['parameters'][0]))
|
!empty($json_data['request']['parameters'][0]))
|
||||||
|
{
|
||||||
|
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?"
|
parse_str(substr($json_data['request']['parameters'][0], 10), $set_states); // cut off "/index.php?"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$set_states = substr($_GET['menuaction'],0,9) == 'calendar.' ? $_REQUEST : array();
|
$set_states = substr($_GET['menuaction'],0,9) == 'calendar.' ? $_REQUEST : array();
|
||||||
|
@ -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 array $event
|
||||||
* @param boolean $added
|
* @param boolean $added
|
||||||
@ -1006,9 +1006,9 @@ class calendar_uiforms extends calendar_ui
|
|||||||
foreach($event['participants'] as $uid => $status)
|
foreach($event['participants'] as $uid => $status)
|
||||||
{
|
{
|
||||||
$toadd = '';
|
$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;
|
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
|
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();
|
$boical = new calendar_ical();
|
||||||
// we need to pass $event[id] so iCal class reads event again,
|
// we need to pass $event[id] so iCal class reads event again,
|
||||||
// as event is in user TZ, but iCal class expects server TZ!
|
// 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'],
|
'history' => !$event['id'],
|
||||||
'alarms' => $readonlys['tabs']['alarms'],
|
'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']['mail']);
|
||||||
unset($sel_options['action']['sendmeetingrequest']);
|
unset($sel_options['action']['sendmeetingrequest']);
|
||||||
|
Loading…
Reference in New Issue
Block a user