database-upgrade

.
This commit is contained in:
Paula V. Quispe
2016-08-18 12:21:29 -04:00
parent 3ef9f577e8
commit fc92f308ed
7 changed files with 34 additions and 21 deletions

View File

@@ -7,22 +7,21 @@ switch ($_GET['action']) {
G::LoadClass( 'serverConfiguration' );
$oServerConf = & serverConf::getSingleton();
$response = new $oServerConf;
G::LoadClass("configuration");
$conf = new Configurations();
/*you can use SYS_TEMP or SYS_SYS ON AUDIT_LOG_CONF to save for each workspace*/
$oServerConf->unsetAuditLogProperty( 'AL_TYPE', SYS_SYS );
if (isset( $_POST['acceptAL'] )) {
$oServerConf->setAuditLogProperty( 'AL_OPTION', 1, SYS_SYS );
$oServerConf->unsetAuditLogProperty( 'AL_NEXT_DATE', SYS_SYS );
$conf->aConfig = 'true';
$conf->saveConfig('AUDIT_LOG', 'log');
$response->enable = true;
G::auditLog("EnableAuditLog");
} else {
G::auditLog("DisableAuditLog");
$oServerConf->setAuditLogProperty( 'AL_OPTION', 0, SYS_SYS );
$oServerConf->unsetAuditLogProperty( 'AL_NEXT_DATE', SYS_SYS );
$oServerConf->setAuditLogProperty( 'AL_TYPE', 'endaudit', SYS_SYS );
$conf->aConfig = 'false';
$conf->saveConfig('AUDIT_LOG', 'log');
$response->enable = false;
}
$response->success = true;
} catch (Exception $e) {
$response->success = false;
$response->msg = $e->getMessage();