mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
import i/e defintions on update
This commit is contained in:
parent
c84c890738
commit
3c14bd7f59
@ -67,6 +67,30 @@ function importexport_upgrade1_9_002()
|
||||
$GLOBALS['egw_setup']->db->concat("','", 'allowed_users', "','");
|
||||
$GLOBALS['egw_setup']->oProc->query($sql, __LINE__, __FILE__);
|
||||
|
||||
// import i/e defintions
|
||||
if (extension_loaded('dom'))
|
||||
{
|
||||
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.importexport_definitions_bo.inc.php');
|
||||
|
||||
// This sets up $GLOBALS['egw']->accounts and $GLOBALS['egw']->db
|
||||
$GLOBALS['egw_setup']->setup_account_object();
|
||||
|
||||
// step through every source code intstalled app
|
||||
$egwdir = dir(EGW_INCLUDE_ROOT);
|
||||
while (false !== ($appdir = $egwdir->read())) {
|
||||
$defdir = EGW_INCLUDE_ROOT. "/$appdir/setup/";
|
||||
if ( !is_dir( $defdir ) ) continue;
|
||||
|
||||
// step through each file in defdir of app
|
||||
$d = dir($defdir);
|
||||
while (false !== ($entry = $d->read())) {
|
||||
$file = $defdir. '/'. $entry;
|
||||
list( $filename, $extension) = explode('.',$entry);
|
||||
if ( $extension != 'xml' ) continue;
|
||||
importexport_definitions_bo::import( $file );
|
||||
}
|
||||
}
|
||||
}
|
||||
// give Default and Admins group rights for ImportExport
|
||||
foreach(array('Default' => 'Default','Admins' => 'Admin') as $account_lid => $name)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user