@@ -88,9 +88,9 @@ class Configurations // extends Configuration
|
||||
}
|
||||
}
|
||||
|
||||
public function exists($cfgID)
|
||||
public function exists($cfgID,$objID='')
|
||||
{
|
||||
return $this->Configuration->exists($cfgID,"",'','','');
|
||||
return $this->Configuration->exists($cfgID,$objID,'','','');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -763,6 +763,9 @@ class workspaceTools
|
||||
$this->checkSequenceNumber();
|
||||
$this->migrateIteeToDummytask($this->name);
|
||||
$this->upgradeConfiguration();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$this->upgradeAuditLog($this->name);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//There records in table "EMAIL_SERVER"
|
||||
$criteria = new Criteria("workflow");
|
||||
@@ -3274,4 +3277,16 @@ class workspaceTools
|
||||
$conf->saveConfig('SKIN_CRON', '');
|
||||
}
|
||||
|
||||
public function upgradeAuditLog($workspace){
|
||||
G::LoadClass("configuration");
|
||||
$conf = new Configurations();
|
||||
if (!$conf->exists('AUDIT_LOG','log')) {
|
||||
CLI::logging("> Updating Auditlog Config \n");
|
||||
$oServerConf = &serverConf::getSingleton();
|
||||
$sAudit = $oServerConf->getAuditLogProperty('AL_OPTION', $workspace);
|
||||
$conf->aConfig = ($sAudit == 1) ? 'true' : 'false';
|
||||
$conf->saveConfig('AUDIT_LOG', 'log');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -61526,7 +61526,8 @@ INSERT INTO CONFIGURATION (CFG_UID,OBJ_UID,CFG_VALUE,PRO_UID,USR_UID,APP_UID) VA
|
||||
('ENVIRONMENT_SETTINGS','','a:1:{s:18:"directoryStructure";i:2;}','','',''),
|
||||
('MIGRATED_LIST','list','true','list','list','list'),
|
||||
('MIGRATED_LIST_UNASSIGNED','list','true','list','list','list'),
|
||||
('SKIN_CRON','','s:10:"neoclassic";','','','');
|
||||
('SKIN_CRON','','s:10:"neoclassic";','','',''),
|
||||
('AUDIT_LOG','log','s:5:"false";','','','');
|
||||
|
||||
INSERT INTO CATALOG (CAT_UID, CAT_LABEL_ID, CAT_TYPE, CAT_FLAG, CAT_OBSERVATION, CAT_CREATE_DATE, CAT_UPDATE_DATE) VALUES
|
||||
('10','ID_BARS','GRAPHIC','','','2015-03-04','2015-03-04'),
|
||||
|
||||
@@ -27,8 +27,8 @@ global $RBAC;
|
||||
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$oServerConf = &serverConf::getSingleton();
|
||||
$sAudit = $oServerConf->getAuditLogProperty('AL_OPTION', SYS_SYS);
|
||||
$conf = new Configurations();
|
||||
$sAudit = $conf->getConfiguration('AUDIT_LOG', 'log');
|
||||
$licensedFeatures = &PMLicensedFeatures::getSingleton();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($RBAC->userCanAccess('PM_SETUP') === 1) {
|
||||
|
||||
@@ -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