mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-28 00:39:19 +01:00
Set default export definition
This commit is contained in:
parent
6da2289f8e
commit
b356e6fbee
@ -619,18 +619,24 @@ class calendar_hooks
|
|||||||
'application' => 'calendar'
|
'application' => 'calendar'
|
||||||
));
|
));
|
||||||
$options = array();
|
$options = array();
|
||||||
foreach ((array)$definitions->get_definitions() as $identifier) {
|
foreach ((array)$definitions->get_definitions() as $identifier)
|
||||||
try {
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
$definition = new importexport_definition($identifier);
|
$definition = new importexport_definition($identifier);
|
||||||
} catch (Exception $e) {
|
}
|
||||||
|
catch (Exception $e)
|
||||||
|
{
|
||||||
// permission error
|
// permission error
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($title = $definition->get_title()) {
|
if ($title = $definition->get_title())
|
||||||
|
{
|
||||||
$options[$title] = $title;
|
$options[$title] = $title;
|
||||||
}
|
}
|
||||||
unset($definition);
|
unset($definition);
|
||||||
}
|
}
|
||||||
|
$default_def = 'export-calendar-csv';
|
||||||
$settings['nextmatch-export-definition'] = array(
|
$settings['nextmatch-export-definition'] = array(
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'values' => $options,
|
'values' => $options,
|
||||||
@ -640,6 +646,7 @@ class calendar_hooks
|
|||||||
'run_lang' => false,
|
'run_lang' => false,
|
||||||
'xmlrpc' => True,
|
'xmlrpc' => True,
|
||||||
'admin' => False,
|
'admin' => False,
|
||||||
|
'default'=> isset($options[$default_def]) ? $default_def : false,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $settings;
|
return $settings;
|
||||||
|
Loading…
Reference in New Issue
Block a user