forked from extern/egroupware
fix PHP 8.0 TypeError: when exporting multiple users
Argument 1 passed to EGroupware\Api\Accounts::username() must be of the type int or null, array given
This commit is contained in:
parent
43806f3e39
commit
a427b5d5c8
@ -660,12 +660,16 @@ class timesheet_ui extends timesheet_bo
|
|||||||
unset($query['col_filter']['cat_id']);
|
unset($query['col_filter']['cat_id']);
|
||||||
}
|
}
|
||||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('timesheet');
|
$GLOBALS['egw_info']['flags']['app_header'] = lang('timesheet');
|
||||||
if ($query['col_filter']['ts_owner'])
|
if (!empty($query['col_filter']['ts_owner']))
|
||||||
{
|
{
|
||||||
$GLOBALS['egw_info']['flags']['app_header'] .= ': '.Api\Accounts::username($query['col_filter']['ts_owner']);
|
$GLOBALS['egw_info']['flags']['app_header'] .= ': '.implode(', ',
|
||||||
#if ($GLOBALS['egw']->accounts->get_type($query['col_filter']['ts_owner']) == 'g') $GLOBALS['egw_info']['flags']['app_header'] .= ' '. lang("and its members");
|
array_map(Api\Accounts::class.'::username', (array)$query['col_filter']['ts_owner']));
|
||||||
#_debug_array($GLOBALS['egw']->accounts->members($query['col_filter']['ts_owner'],true));
|
|
||||||
if ($query['col_filter']['ts_owner']<0) $query['col_filter']['ts_owner'] = array_merge(array($query['col_filter']['ts_owner']),$GLOBALS['egw']->accounts->members($query['col_filter']['ts_owner'],true));
|
if ($query['col_filter']['ts_owner'] < 0)
|
||||||
|
{
|
||||||
|
$query['col_filter']['ts_owner'] = array_merge(array($query['col_filter']['ts_owner']),
|
||||||
|
$GLOBALS['egw']->accounts->members($query['col_filter']['ts_owner'],true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user