From c1e95fe2d3bf81af9ce0f80d185b913a5c5dbca1 Mon Sep 17 00:00:00 2001 From: "Paula V. Quispe" Date: Wed, 18 Feb 2015 15:58:46 -0400 Subject: [PATCH] I corrected only the Ouputdocument file --- .../engine/classes/model/OutputDocument.php | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/workflow/engine/classes/model/OutputDocument.php b/workflow/engine/classes/model/OutputDocument.php index c30b455c1..07e2d227f 100755 --- a/workflow/engine/classes/model/OutputDocument.php +++ b/workflow/engine/classes/model/OutputDocument.php @@ -173,6 +173,34 @@ class OutputDocument extends BaseOutputDocument $iResult = $oOutputDocument->save(); $oConnection->commit(); + //Add Audit Log + $description = "Output Document Name: ".$aData['OUT_DOC_TITLE'].", Output Document Uid: ".$aData['OUT_DOC_UID'].", Filename generated: ".$aData['OUT_DOC_FILENAME']; + if(!empty($aData['OUT_DOC_DESCRIPTION'])){ + $description .= ", Description: ".$aData['OUT_DOC_DESCRIPTION']; + } + $description .= ", Report Generator: ". $aData['OUT_DOC_REPORT_GENERATOR'].", Output Document to Generate: ".$aData['OUT_DOC_GENERATE']; + if($aData['OUT_DOC_PDF_SECURITY_ENABLED']==0){ + $pdfSecurity = 'Disabled'; + }else{ + $pdfSecurity = 'Enabled'; + } + $description .= ", PDF Security: ".$pdfSecurity; + if(!empty($aData['OUT_DOC_VERSIONING'])){ + $description .= ", Enable Versioning: Yes"; + } + if(!empty($aData['OUT_DOC_DESTINATION_PATH'])){ + $description .= ", Destination Path: ".$aData['OUT_DOC_DESTINATION_PATH']; + } + if(!empty($aData['OUT_DOC_TAGS'])){ + $description .= ", Tags: ".$aData['OUT_DOC_TAGS']; + } + if($aData['OUT_DOC_OPEN_TYPE']==0){ + $genLink = 'Open the file'; + }else{ + $genLink = 'Download the file'; + } + $description .= ", By clicking on the generated file link: ".$genLink; + G::auditLog("CreateOuputDocument", $description); return $aData['OUT_DOC_UID']; } else { @@ -228,6 +256,37 @@ class OutputDocument extends BaseOutputDocument $iResult = $oOutputDocument->save(); $oConnection->commit(); + //Add Audit Log + $description = "Output Document Name: ".$aData['OUT_DOC_TITLE'].", Output Document Uid: ".$aData['OUT_DOC_UID'].", Filename generated: ".$aData['OUT_DOC_FILENAME']; + if(!empty($aData['OUT_DOC_DESCRIPTION'])){ + $description .= ", Description: ".$aData['OUT_DOC_DESCRIPTION']; + } + $description .= ", Report Generator: ". $aData['OUT_DOC_REPORT_GENERATOR'].", Output Document to Generate: ".$aData['OUT_DOC_GENERATE']; + if($aData['OUT_DOC_PDF_SECURITY_ENABLED']==0){ + $pdfSecurity = 'Disabled'; + }else{ + $pdfSecurity = 'Enabled'; + } + $description .= ", PDF Security: ".$pdfSecurity; + if(!empty($aData['OUT_DOC_VERSIONING'])){ + $description .= ", Enable Versioning: Yes"; + } + if(!empty($aData['OUT_DOC_DESTINATION_PATH'])){ + $description .= ", Destination Path: ".$aData['OUT_DOC_DESTINATION_PATH']; + } + if(!empty($aData['OUT_DOC_TAGS'])){ + $description .= ", Tags: ".$aData['OUT_DOC_TAGS']; + } + if($aData['OUT_DOC_OPEN_TYPE']==0){ + $genLink = 'Open the file'; + }else{ + $genLink = 'Download the file'; + } + $description .= ", By clicking on the generated file link: ".$genLink; + if (isset($aData['OUT_DOC_TEMPLATE'])) { + $description .= ", [EDIT TEMPLATE]"; + } + G::auditLog("UpdateOuputDocument", $description); return $iResult; } else { @@ -269,7 +328,9 @@ class OutputDocument extends BaseOutputDocument Content::removeContent('OUT_DOC_FILENAME', '', $oOutputDocument->getOutDocUid()); Content::removeContent('OUT_DOC_TEMPLATE', '', $oOutputDocument->getOutDocUid()); $iResult = $oOutputDocument->delete(); - $oConnectutDocUid.")"); + $oConnection->commit(); + //Add Audit Log + G::auditLog("DeleteOuputDocument", "Output Document Name: ".$outputName.", Output Document Uid: ".$sOutDocUid.", Description: ".$outputDesc.", Filename generated: ".$outputFile); return $iResult; } else {