2014-10-07 15:58:46 -04:00
|
|
|
<?php
|
|
|
|
|
global $G_TMP_MENU;
|
|
|
|
|
|
|
|
|
|
switch ($_GET['action']) {
|
|
|
|
|
case 'saveOption':
|
|
|
|
|
try {
|
|
|
|
|
G::LoadClass( 'serverConfiguration' );
|
|
|
|
|
$oServerConf = & serverConf::getSingleton();
|
2014-10-13 11:50:17 -04:00
|
|
|
$response = new $oServerConf;
|
2016-08-18 12:21:29 -04:00
|
|
|
G::LoadClass("configuration");
|
|
|
|
|
$conf = new Configurations();
|
2014-10-07 15:58:46 -04:00
|
|
|
/*you can use SYS_TEMP or SYS_SYS ON AUDIT_LOG_CONF to save for each workspace*/
|
|
|
|
|
if (isset( $_POST['acceptAL'] )) {
|
2016-08-18 12:21:29 -04:00
|
|
|
$conf->aConfig = 'true';
|
|
|
|
|
$conf->saveConfig('AUDIT_LOG', 'log');
|
2014-10-07 15:58:46 -04:00
|
|
|
$response->enable = true;
|
2014-10-10 12:19:34 -04:00
|
|
|
G::auditLog("EnableAuditLog");
|
2014-10-07 15:58:46 -04:00
|
|
|
} else {
|
2014-10-13 12:08:57 -04:00
|
|
|
G::auditLog("DisableAuditLog");
|
2016-08-18 12:21:29 -04:00
|
|
|
$conf->aConfig = 'false';
|
|
|
|
|
$conf->saveConfig('AUDIT_LOG', 'log');
|
2014-10-07 15:58:46 -04:00
|
|
|
$response->enable = false;
|
|
|
|
|
}
|
|
|
|
|
$response->success = true;
|
|
|
|
|
} catch (Exception $e) {
|
|
|
|
|
$response->success = false;
|
|
|
|
|
$response->msg = $e->getMessage();
|
|
|
|
|
}
|
|
|
|
|
echo G::json_encode( $response );
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|