I solved the issue PM-1582
This commit is contained in:
@@ -53,6 +53,28 @@ class CaseScheduler extends BaseCaseScheduler
|
|||||||
throw ($e);
|
throw ($e);
|
||||||
}
|
}
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
|
||||||
|
//Add Audit Log
|
||||||
|
switch ($aData['SCH_OPTION']) {
|
||||||
|
case '1':
|
||||||
|
$perform = 'Daily';
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
$perform = 'Weekly';
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
$perform = 'Monthly';
|
||||||
|
break;
|
||||||
|
case '4':
|
||||||
|
$perform = 'One time only';
|
||||||
|
break;
|
||||||
|
case '5':
|
||||||
|
$perform = 'Every';
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
G::auditLog("CreateCaseScheduler", "Scheduler Name: ".$aData['SCH_NAME'].", Task: ".$aData['TAS_UID'].", Perform this task: ".$perform.", Start Date: ".$aData['SCH_START_DATE'].", End Date: ".$aData['SCH_END_DATE'].", Execution time : ".$aData['SCH_START_TIME']);
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
@@ -70,6 +92,27 @@ class CaseScheduler extends BaseCaseScheduler
|
|||||||
if ($this->validate()) {
|
if ($this->validate()) {
|
||||||
$result = $this->save();
|
$result = $this->save();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
|
||||||
|
//Add Audit Log
|
||||||
|
switch ($fields['SCH_OPTION']){
|
||||||
|
case '1':
|
||||||
|
$perform = 'Daily';
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
$perform = 'Weekly';
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
$perform = 'Monthly';
|
||||||
|
break;
|
||||||
|
case '4':
|
||||||
|
$perform = 'One time only';
|
||||||
|
break;
|
||||||
|
case '5':
|
||||||
|
$perform = 'Every';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
G::auditLog("UpdateCaseScheduler", "Scheduler Name: ".$fields['SCH_NAME'].", Task: ".$fields['TAS_UID'].", Perform this task: ".$perform.", Start Date: ".$fields['SCH_START_DATE'].", End Date: ".$fields['SCH_END_DATE'].", Execution time : ".$fields['SCH_START_TIME']);
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
} else {
|
} else {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
@@ -87,8 +130,12 @@ class CaseScheduler extends BaseCaseScheduler
|
|||||||
try {
|
try {
|
||||||
$oCaseScheduler = CaseSchedulerPeer::retrieveByPK( $SchUid );
|
$oCaseScheduler = CaseSchedulerPeer::retrieveByPK( $SchUid );
|
||||||
if (! is_null( $oCaseScheduler )) {
|
if (! is_null( $oCaseScheduler )) {
|
||||||
|
$fields = $this->Load( $SchUid );
|
||||||
$iResult = $oCaseScheduler->delete();
|
$iResult = $oCaseScheduler->delete();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
//Add Audit Log
|
||||||
|
G::auditLog("DeleteCaseScheduler", "Scheduler Name: ".$fields['SCH_NAME'].", Task: ".$fields['TAS_UID']);
|
||||||
|
|
||||||
return $iResult;
|
return $iResult;
|
||||||
} else {
|
} else {
|
||||||
throw (new Exception( 'This row doesn\'t exist!' ));
|
throw (new Exception( 'This row doesn\'t exist!' ));
|
||||||
|
|||||||
@@ -141,6 +141,9 @@ class DbSource extends BaseDbSource
|
|||||||
if ($this->validate()) {
|
if ($this->validate()) {
|
||||||
$result = $this->save();
|
$result = $this->save();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
//Add Audit Log
|
||||||
|
G::auditLog("UpdateDatabaseConnection", "Connection Uid: ".$fields['DBS_UID'].", Connection Engine: ".$fields['DBS_TYPE'].", Connection Encode: ".$fields['DBS_ENCODE'].", Connection Server: ".$fields['DBS_SERVER'].", Connection Database: ".$fields['DBS_DATABASE_NAME'].", Connection Port: ".$fields['DBS_PORT']);
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
} else {
|
} else {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
@@ -156,6 +159,7 @@ class DbSource extends BaseDbSource
|
|||||||
{
|
{
|
||||||
$con = Propel::getConnection(DbSourcePeer::DATABASE_NAME);
|
$con = Propel::getConnection(DbSourcePeer::DATABASE_NAME);
|
||||||
try {
|
try {
|
||||||
|
$fields = $this->load($DbsUid, $ProUID);
|
||||||
$con->begin();
|
$con->begin();
|
||||||
$this->setDbsUid($DbsUid);
|
$this->setDbsUid($DbsUid);
|
||||||
$this->setProUid($ProUID);
|
$this->setProUid($ProUID);
|
||||||
@@ -167,6 +171,9 @@ class DbSource extends BaseDbSource
|
|||||||
}
|
}
|
||||||
$result = $this->delete();
|
$result = $this->delete();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
//Add Audit Log
|
||||||
|
G::auditLog("DeleteDatabaseConnection", "Connection Uid: ".$DbsUid.", Connection Engine: ".$fields['DBS_TYPE'].", Connection Database: ".$fields['DBS_DATABASE_NAME']);
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
} catch (exception $e) {
|
} catch (exception $e) {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
@@ -196,6 +203,9 @@ class DbSource extends BaseDbSource
|
|||||||
throw ($e);
|
throw ($e);
|
||||||
}
|
}
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
//Add Audit Log
|
||||||
|
G::auditLog("CreateDatabaseConnection", "Connection Uid: ".$aData['DBS_UID'].", Connection Engine: ".$aData['DBS_TYPE'].", Connection Encode: ".$aData['DBS_ENCODE'].", Connection Server: ".$aData['DBS_SERVER'].", Connection Database: ".$aData['DBS_DATABASE_NAME'].", Connection Port: ".$aData['DBS_PORT']);
|
||||||
|
|
||||||
return $this->getDbsUid();
|
return $this->getDbsUid();
|
||||||
} catch (exception $e) {
|
} catch (exception $e) {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
|
|||||||
@@ -126,6 +126,34 @@ class InputDocument extends BaseInputDocument
|
|||||||
}
|
}
|
||||||
$iResult = $oInputDocument->save();
|
$iResult = $oInputDocument->save();
|
||||||
$oConnection->commit();
|
$oConnection->commit();
|
||||||
|
//Add Audit Log
|
||||||
|
switch ($aData['INP_DOC_FORM_NEEDED']){
|
||||||
|
case 'VIRTUAL':
|
||||||
|
$docType = 'Digital';
|
||||||
|
break;
|
||||||
|
case 'REAL':
|
||||||
|
$docType = 'Printed';
|
||||||
|
break;
|
||||||
|
case 'VREAL':
|
||||||
|
$docType = 'Digital/Printed';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(isset($aData['INP_DOC_VERSIONING']) && $aData['INP_DOC_VERSIONING'] == 1){
|
||||||
|
$enableVersion = 'Yes';
|
||||||
|
}else{
|
||||||
|
$enableVersion = 'No';
|
||||||
|
}
|
||||||
|
$description = "Input Document Title: ".$aData['INP_DOC_TITLE'].", Input Document Uid: ".$aData['INP_DOC_UID'].", Document Type: ".$docType;
|
||||||
|
if(!empty($aData['INP_DOC_DESCRIPTION'])){
|
||||||
|
$description .= ", Description: ".$aData['INP_DOC_DESCRIPTION'];
|
||||||
|
}
|
||||||
|
if(!empty($aData['INP_DOC_DESTINATION_PATH'])){
|
||||||
|
$description .= ", Destination Path: ".$aData['INP_DOC_DESTINATION_PATH'];
|
||||||
|
}
|
||||||
|
$inputDocMaxFileSize = $aData['INP_DOC_MAX_FILESIZE']? $aData['INP_DOC_MAX_FILESIZE'].' '.$aData['INP_DOC_MAX_FILESIZE_UNIT'] : "256 MB";
|
||||||
|
$description .= ", Extensions: ".$aData['INP_DOC_TYPE_FILE'].", Maximum Input Document file size: ".$inputDocMaxFileSize;
|
||||||
|
G::auditLog("CreateInputDocument", $description);
|
||||||
|
|
||||||
return $aData['INP_DOC_UID'];
|
return $aData['INP_DOC_UID'];
|
||||||
} else {
|
} else {
|
||||||
$sMessage = '';
|
$sMessage = '';
|
||||||
@@ -165,6 +193,34 @@ class InputDocument extends BaseInputDocument
|
|||||||
}
|
}
|
||||||
$iResult = $oInputDocument->save();
|
$iResult = $oInputDocument->save();
|
||||||
$oConnection->commit();
|
$oConnection->commit();
|
||||||
|
//Add Audit Log
|
||||||
|
switch ($aData['INP_DOC_FORM_NEEDED']){
|
||||||
|
case 'VIRTUAL':
|
||||||
|
$docType = 'Digital';
|
||||||
|
break;
|
||||||
|
case 'REAL':
|
||||||
|
$docType = 'Printed';
|
||||||
|
break;
|
||||||
|
case 'VREAL':
|
||||||
|
$docType = 'Digital/Printed';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(isset($aData['INP_DOC_VERSIONING']) && $aData['INP_DOC_VERSIONING'] == 1){
|
||||||
|
$enableVersion = 'Yes';
|
||||||
|
}else{
|
||||||
|
$enableVersion = 'No';
|
||||||
|
}
|
||||||
|
$description = "Input Document Title: ".$aData['INP_DOC_TITLE'].", Input Document Uid: ".$aData['INP_DOC_UID'].", Document Type: ".$docType;
|
||||||
|
if(!empty($aData['INP_DOC_DESCRIPTION'])){
|
||||||
|
$description .= ", Description: ".$aData['INP_DOC_DESCRIPTION'];
|
||||||
|
}
|
||||||
|
if(!empty($aData['INP_DOC_DESTINATION_PATH'])){
|
||||||
|
$description .= ", Destination Path: ".$aData['INP_DOC_DESTINATION_PATH'];
|
||||||
|
}
|
||||||
|
$inputDocMaxFileSize = $aData['INP_DOC_MAX_FILESIZE']? $aData['INP_DOC_MAX_FILESIZE'].' '.$aData['INP_DOC_MAX_FILESIZE_UNIT'] : "256 MB";
|
||||||
|
$description .= ", Extensions: ".$aData['INP_DOC_TYPE_FILE'].", Maximum Input Document file size: ".$inputDocMaxFileSize;
|
||||||
|
G::auditLog("UpdateInputDocument", $description);
|
||||||
|
|
||||||
return $iResult;
|
return $iResult;
|
||||||
} else {
|
} else {
|
||||||
$sMessage = '';
|
$sMessage = '';
|
||||||
@@ -196,11 +252,18 @@ class InputDocument extends BaseInputDocument
|
|||||||
try {
|
try {
|
||||||
$oInputDocument = InputDocumentPeer::retrieveByPK( $sInpDocUid );
|
$oInputDocument = InputDocumentPeer::retrieveByPK( $sInpDocUid );
|
||||||
if (! is_null( $oInputDocument )) {
|
if (! is_null( $oInputDocument )) {
|
||||||
|
$nameInput = $this->getInpDocTitle();
|
||||||
|
$descInput = $this->getInpDocDescription();
|
||||||
$oConnection->begin();
|
$oConnection->begin();
|
||||||
Content::removeContent( 'INP_DOC_TITLE', '', $oInputDocument->getInpDocUid() );
|
Content::removeContent( 'INP_DOC_TITLE', '', $oInputDocument->getInpDocUid() );
|
||||||
Content::removeContent( 'INP_DOC_DESCRIPTION', '', $oInputDocument->getInpDocUid() );
|
Content::removeContent( 'INP_DOC_DESCRIPTION', '', $oInputDocument->getInpDocUid() );
|
||||||
$iResult = $oInputDocument->delete();
|
$iResult = $oInputDocument->delete();
|
||||||
$oConnection->commit();
|
$oConnection->commit();
|
||||||
|
//Add Audit Log
|
||||||
|
$nameInput = $this->getInpDocTitle();
|
||||||
|
$descInput = $this->getInpDocDescription();
|
||||||
|
G::auditLog("DeleteInputDocument", "Input Document Name: ".$nameInput.", Input Document Uid: ".$sInpDocUid.", Description: ".$descInput);
|
||||||
|
|
||||||
return $iResult;
|
return $iResult;
|
||||||
} else {
|
} else {
|
||||||
throw (new Exception( 'This row doesn\'t exist!' ));
|
throw (new Exception( 'This row doesn\'t exist!' ));
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -155,7 +155,7 @@ class Triggers extends BaseTriggers
|
|||||||
} else {
|
} else {
|
||||||
$this->setTriUid($aData['TRI_UID'] );
|
$this->setTriUid($aData['TRI_UID'] );
|
||||||
}
|
}
|
||||||
|
$triggerUid = $this->getTriUid();
|
||||||
$this->setProUid($aData['PRO_UID']);
|
$this->setProUid($aData['PRO_UID']);
|
||||||
$this->setTriType("SCRIPT");
|
$this->setTriType("SCRIPT");
|
||||||
|
|
||||||
@@ -183,6 +183,13 @@ class Triggers extends BaseTriggers
|
|||||||
}
|
}
|
||||||
$result=$this->save();
|
$result=$this->save();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
//Add Audit Log
|
||||||
|
$description = "Trigger Name: ".$aData['TRI_TITLE'].", Trigger Uid: ".$triggerUid;
|
||||||
|
if (isset ( $aData['TRI_DESCRIPTION'] )) {
|
||||||
|
$description .= ", Description: ".$aData['TRI_DESCRIPTION'];
|
||||||
|
}
|
||||||
|
G::auditLog("CreateTrigger", $description);
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
} else {
|
} else {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
@@ -233,10 +240,18 @@ class Triggers extends BaseTriggers
|
|||||||
$con->begin();
|
$con->begin();
|
||||||
$oTri = TriggersPeer::retrieveByPK( $TriUid );
|
$oTri = TriggersPeer::retrieveByPK( $TriUid );
|
||||||
if (!is_null($oTri)) {
|
if (!is_null($oTri)) {
|
||||||
|
$triggerName = $this->getTriTitle();
|
||||||
|
$triggerDesc = $this->getTriDescription();
|
||||||
Content::removeContent( 'TRI_TITLE', '', $this->getTriUid());
|
Content::removeContent( 'TRI_TITLE', '', $this->getTriUid());
|
||||||
Content::removeContent( 'TRI_DESCRIPTION', '', $this->getTriUid());
|
Content::removeContent( 'TRI_DESCRIPTION', '', $this->getTriUid());
|
||||||
$result = $oTri->delete();
|
$result = $oTri->delete();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
//Add Audit Log
|
||||||
|
$description = "Trigger Name: ".$triggerName.", Trigger Uid: ".$TriUid;
|
||||||
|
if (isset ( $triggerDesc )) {
|
||||||
|
$description .= ", Description: ".$triggerDesc;
|
||||||
|
}
|
||||||
|
G::auditLog("DeleteTrigger", $description);
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|||||||
@@ -101,15 +101,27 @@ if (isset( $sfunction ) && $sfunction == 'lookforNameTrigger') {
|
|||||||
}
|
}
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
}
|
}
|
||||||
|
$swCreate = true;
|
||||||
if ($value['TRI_UID'] != '') {
|
if ($value['TRI_UID'] != '') {
|
||||||
$oTrigger->load( $value['TRI_UID'] );
|
$oTrigger->load( $value['TRI_UID'] );
|
||||||
} else {
|
} else {
|
||||||
$oTrigger->create( $value );
|
$oTrigger->create( $value );
|
||||||
$value['TRI_UID'] = $oTrigger->getTriUid();
|
$value['TRI_UID'] = $oTrigger->getTriUid();
|
||||||
}
|
$swCreate = false;
|
||||||
//print_r($_POST['form']);die;
|
}
|
||||||
$oTrigger->update( $value );
|
$oTrigger->update( $value );
|
||||||
|
if($swCreate){
|
||||||
|
//Add Audit Log
|
||||||
|
$fields = $oTrigger->load( $value['TRI_UID'] );
|
||||||
|
$description = "Trigger Name: ".$fields['TRI_TITLE'].", Trigger Uid: ".$value['TRI_UID'];
|
||||||
|
if (isset ( $fields['TRI_DESCRIPTION'] )) {
|
||||||
|
$description .= ", Description: ".$fields['TRI_DESCRIPTION'];
|
||||||
|
}
|
||||||
|
if (isset($value["TRI_WEBBOT"])) {
|
||||||
|
$description .= ", [EDIT CODE]";
|
||||||
|
}
|
||||||
|
G::auditLog("UpdateTrigger", $description);
|
||||||
|
}
|
||||||
|
|
||||||
//if (! isset( $_POST['mode'] )) {
|
//if (! isset( $_POST['mode'] )) {
|
||||||
// $oProcessMap->triggersList( $value['PRO_UID'] );
|
// $oProcessMap->triggersList( $value['PRO_UID'] );
|
||||||
|
|||||||
Reference in New Issue
Block a user