HOR-244

HOR-244

HOR-244

HOR-244

HOR-244

HOR-244
This commit is contained in:
Paula V. Quispe
2016-02-17 16:44:14 -04:00
parent abdc846944
commit 4f72a3af32
4 changed files with 92 additions and 1 deletions

View File

@@ -744,6 +744,7 @@ class workspaceTools
p11835::isApplicable();
$systemSchema = System::getSystemSchema($this->dbAdapter);
$systemSchemaRbac = System::getSystemSchemaRbac($this->dbAdapter);// get the Rbac Schema
$this->registerSystemTables(array_merge($systemSchema,$systemSchemaRbac));
$this->upgradeSchema( $systemSchema );
$this->upgradeSchema( $systemSchemaRbac, false, true, $onedb ); // perform Upgrade to Rbac
$this->upgradeData();
@@ -2279,4 +2280,22 @@ class workspaceTools
throw $e;
}
}
/**
* Register system tables in a file
*
* return void
*/
public static function registerSystemTables($aSquema){
//Register all tables
$sListTables = '';
foreach ($aSquema as $key => $value) {
$sListTables .= $key .'|';
}
$sysTablesIniFile= PATH_CONFIG . 'system-tables.ini';
$contents = file_put_contents( $sysTablesIniFile, sprintf( "%s '%s'\n", "tables = ", $sListTables ) );
if ($contents === null) {
throw (new Exception( G::LoadTranslation('ID_FILE_NOT_WRITEABLE', SYS_LANG, array($sysTablesIniFile) ) ));
}
}
}