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

@@ -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,'','','');
}
/**

View File

@@ -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');
}
}
}