HOR-1624
database-upgrade .
This commit is contained in:
@@ -3,13 +3,10 @@
|
||||
global $RBAC;
|
||||
$RBAC->requirePermissions( 'PM_SETUP' );
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
G::LoadClass( 'serverConfiguration' );
|
||||
$conf = new Configurations();
|
||||
$sflag = $conf->getConfiguration('AUDIT_LOG', 'log');
|
||||
|
||||
$oServerConf = & serverConf::getSingleton();
|
||||
|
||||
$sflag = $oServerConf->getAuditLogProperty( 'AL_OPTION', SYS_SYS );
|
||||
$auditLogChecked = $sflag == 1 ? true : false;
|
||||
$auditLogChecked = $sflag == 'true' ? true : false;
|
||||
|
||||
$oHeadPublisher->addExtJsScript( 'setup/auditLogConfig', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->assign( 'auditLogChecked', $auditLogChecked );
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user