forked from extern/egroupware
Set default export definition
This commit is contained in:
parent
60fea18906
commit
6da2289f8e
@ -284,14 +284,20 @@ class addressbook_hooks
|
||||
'application' => 'addressbook'
|
||||
));
|
||||
$options = array();
|
||||
foreach ((array)$definitions->get_definitions() as $identifier) {
|
||||
try {
|
||||
$default_def = 'export-addressbook';
|
||||
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);
|
||||
@ -305,6 +311,7 @@ class addressbook_hooks
|
||||
'run_lang' => false,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
'default'=> isset($options[$default_def]) ? $default_def : false,
|
||||
);
|
||||
}
|
||||
return $settings;
|
||||
|
Loading…
Reference in New Issue
Block a user