forked from extern/egroupware
Set default export definition
This commit is contained in:
parent
1f66093694
commit
5d4b6fac2f
@ -409,18 +409,24 @@ class infolog_hooks
|
||||
'application' => 'infolog'
|
||||
));
|
||||
$options = array();
|
||||
foreach ((array)$definitions->get_definitions() as $identifier) {
|
||||
try {
|
||||
foreach ((array)$definitions->get_definitions() as $identifier)
|
||||
{
|
||||
try
|
||||
{
|
||||
$definition = new importexport_definition($identifier);
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
// permission error
|
||||
continue;
|
||||
}
|
||||
if ($title = $definition->get_title()) {
|
||||
if ($title = $definition->get_title())
|
||||
{
|
||||
$options[$title] = $title;
|
||||
}
|
||||
unset($definition);
|
||||
}
|
||||
$default_def = 'export-infolog';
|
||||
$settings['nextmatch-export-definition'] = array(
|
||||
'type' => 'select',
|
||||
'values' => $options,
|
||||
@ -429,7 +435,8 @@ class infolog_hooks
|
||||
'help' => lang('If you specify an export definition, it will be used when you export'),
|
||||
'run_lang' => false,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
'admin' => False,
|
||||
'default'=> isset($options[$default_def]) ? $default_def : false,
|
||||
);
|
||||
}
|
||||
return $settings;
|
||||
|
Loading…
Reference in New Issue
Block a user