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'
|
'application' => 'addressbook'
|
||||||
));
|
));
|
||||||
$options = array();
|
$options = array();
|
||||||
foreach ((array)$definitions->get_definitions() as $identifier) {
|
$default_def = 'export-addressbook';
|
||||||
try {
|
foreach ((array)$definitions->get_definitions() as $identifier)
|
||||||
|
{
|
||||||
|
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);
|
||||||
@ -305,6 +311,7 @@ class addressbook_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