mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 15:33:23 +01:00
Get rid of a bunch more warnings
This commit is contained in:
parent
8ed5c2aa7e
commit
5b621ffcba
@ -178,7 +178,7 @@ abstract class Entry extends Transformer
|
||||
list($app, $type) = explode('-', $attrs['type']);
|
||||
$data_id = isset($attrs['value']) ? $attrs['value'] : $attrs['id'];
|
||||
$id = is_array($data) ? static::get_array($data, $data_id) : $data;
|
||||
if(!$app || !$type || !$GLOBALS['egw_info']['apps'][$app] || !$id ||
|
||||
if(!$app || !$type || !isset($GLOBALS['egw_info']['apps'][$app]) || !$id ||
|
||||
// Simple CF, already there
|
||||
isset($data[$attrs['field']])
|
||||
)
|
||||
|
@ -1683,13 +1683,14 @@ abstract class Merge
|
||||
{
|
||||
if(str_starts_with($cf_sub, '#'))
|
||||
{
|
||||
$expand_sub_cfs[$cf[$index]] .= '$$' . $cf_sub . '$$ ';
|
||||
$expand_sub_cfs[$cf[$index]] = (isset($expand_sub_cfs[$cf[$index]]) ? $expand_sub_cfs[$cf[$index]] : '') .
|
||||
'$$' . $cf_sub . '$$ ';
|
||||
}
|
||||
}
|
||||
|
||||
foreach($cf as $index => $field)
|
||||
{
|
||||
if($cfs[$field])
|
||||
if(isset($cfs[$field]))
|
||||
{
|
||||
if(in_array($cfs[$field]['type'], array_keys($GLOBALS['egw_info']['apps'])))
|
||||
{
|
||||
@ -1719,18 +1720,18 @@ abstract class Merge
|
||||
}
|
||||
|
||||
// Get replacements for that application
|
||||
if(!$app_replacements[$field])
|
||||
if(!isset($app_replacements[$field]))
|
||||
{
|
||||
// If we send the real content it can result in infinite loop of lookups
|
||||
// so we send only the used fields
|
||||
$content = $expand_sub_cfs[$field] ?? $matches[0][$index];
|
||||
$app_replacements[$field] = $this->get_app_replacements($field_app, $values['#' . $field], $content);
|
||||
}
|
||||
$replacements[$placeholders[$index]] = $app_replacements[$field]['$$' . $sub[$index] . '$$'];
|
||||
$replacements[$placeholders[$index]] = $app_replacements[$field]['$$' . $sub[$index] . '$$'] ?? '';
|
||||
}
|
||||
else
|
||||
{
|
||||
if($cfs[$field]['type'] == 'date' || $cfs[$field]['type'] == 'date-time')
|
||||
if(isset($cfs[$field]) && ($cfs[$field]['type'] == 'date' || $cfs[$field]['type'] == 'date-time'))
|
||||
{
|
||||
$this->date_fields[] = '#' . $field;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ class calendar_holidays
|
||||
{
|
||||
ksort($data);
|
||||
}
|
||||
error_log(__METHOD__."('$country', $year, $end_year) took ". number_format(microtime(true)-$starttime, 3).'s to fetch '.count(call_user_func_array('array_merge', $years)).' events');
|
||||
//error_log(__METHOD__."('$country', $year, $end_year) took ". number_format(microtime(true)-$starttime, 3).'s to fetch '.count(call_user_func_array('array_merge', $years)).' events');
|
||||
unset($starttime);
|
||||
|
||||
return $until_year ? $years : $years[$year];
|
||||
|
@ -351,7 +351,24 @@ class importexport_export_csv implements importexport_iface_export_record
|
||||
$names = array();
|
||||
foreach($record->$name as $_name)
|
||||
{
|
||||
$option = $selects[$name][$_name];
|
||||
$select_options = $selects[$name] ?? [];
|
||||
$option = '';
|
||||
foreach($select_options as $key => $select_option)
|
||||
{
|
||||
if(is_array($select_option) && isset($select_option['value']) && $select_option['value'] == $name && isset($select_option['label']))
|
||||
{
|
||||
$option = $select_option['label'];
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($key == $name && !is_array($select_option))
|
||||
{
|
||||
$option = $select_option;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$names[] = lang(is_array($option) && $option['label'] ? $option['label'] : $option);
|
||||
}
|
||||
$record->$name = implode(', ', $names);
|
||||
|
Loading…
Reference in New Issue
Block a user