mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-21 13:29:01 +01:00
Remove incorrect attempt at setting defaults
This commit is contained in:
parent
f031b3dde2
commit
02a93ae43e
@ -25,23 +25,12 @@ while (false !== ($appdir = $egwdir->read())) {
|
|||||||
$defdir = EGW_INCLUDE_ROOT. "/$appdir/setup/";
|
$defdir = EGW_INCLUDE_ROOT. "/$appdir/setup/";
|
||||||
if ( !is_dir( $defdir ) ) continue;
|
if ( !is_dir( $defdir ) ) continue;
|
||||||
|
|
||||||
// step through each file in defdir of app
|
// step through each file in defdir of app
|
||||||
$d = dir($defdir);
|
$d = dir($defdir);
|
||||||
while (false !== ($entry = $d->read())) {
|
while (false !== ($entry = $d->read())) {
|
||||||
$file = $defdir. '/'. $entry;
|
$file = $defdir. '/'. $entry;
|
||||||
list( $filename, $extension) = explode('.',$entry);
|
list( $filename, $extension) = explode('.',$entry);
|
||||||
if ( $extension != 'xml' ) continue;
|
if ( $extension != 'xml' ) continue;
|
||||||
importexport_definitions_bo::import( $file );
|
importexport_definitions_bo::import( $file );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set as default definition for the app, if there is no site default yet
|
|
||||||
if(!$GLOBALS['egw']->preferences->default[$appdir]['nextmatch-export-definition']) {
|
|
||||||
$bo = new importexport_definitions_bo(array('name' => "export-$appdir"));
|
|
||||||
$definitions = $bo->get_definitions();
|
|
||||||
if($definitions[0]) {
|
|
||||||
$definition = $definition[0];
|
|
||||||
$GLOBALS['egw']->preferences->add($appdir, 'nextmatch-export-definition', "export-$appdir", 'default');
|
|
||||||
$GLOBALS['egw']->preferences->save_repository(true, 'default');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user