diff --git a/workflow/engine/classes/model/OutputDocument.php b/workflow/engine/classes/model/OutputDocument.php index f8a78f680..a4c96bce7 100755 --- a/workflow/engine/classes/model/OutputDocument.php +++ b/workflow/engine/classes/model/OutputDocument.php @@ -173,35 +173,7 @@ 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 { $sMessage = ''; @@ -255,40 +227,8 @@ 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); - - + $oConnectOC_UID'].")"); + return $iResult; } else { $sMessage = ''; @@ -323,18 +263,13 @@ class OutputDocument extends BaseOutputDocument $oOutputDocument = OutputDocumentPeer::retrieveByPK($sOutDocUid); if (!is_null($oOutputDocument)) { - $outputName = $this->getOutDocTitle(); - $outputDesc = $this->getOutDocDescription(); - $outputFile = $this->getOutDocFilename(); $oConnection->begin(); Content::removeContent('OUT_DOC_TITLE', '', $oOutputDocument->getOutDocUid()); Content::removeContent('OUT_DOC_DESCRIPTION', '', $oOutputDocument->getOutDocUid()); Content::removeContent('OUT_DOC_FILENAME', '', $oOutputDocument->getOutDocUid()); Content::removeContent('OUT_DOC_TEMPLATE', '', $oOutputDocument->getOutDocUid()); $iResult = $oOutputDocument->delete(); - $oConnection->commit(); - //Add Audit Log - G::auditLog("DeleteOuputDocument", "Output Document Name: ".$outputName.", Output Document Uid: ".$sOutDocUid.", Description: ".$outputDesc.", Filename generated: ".$outputFile); + $oConnectutDocUid.")"); return $iResult; } else {