OutputDocument
This commit is contained in:
@@ -173,35 +173,7 @@ class OutputDocument extends BaseOutputDocument
|
|||||||
|
|
||||||
$iResult = $oOutputDocument->save();
|
$iResult = $oOutputDocument->save();
|
||||||
$oConnection->commit();
|
$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'];
|
return $aData['OUT_DOC_UID'];
|
||||||
} else {
|
} else {
|
||||||
$sMessage = '';
|
$sMessage = '';
|
||||||
@@ -255,40 +227,8 @@ class OutputDocument extends BaseOutputDocument
|
|||||||
}
|
}
|
||||||
|
|
||||||
$iResult = $oOutputDocument->save();
|
$iResult = $oOutputDocument->save();
|
||||||
$oConnection->commit();
|
$oConnectOC_UID'].")");
|
||||||
//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;
|
return $iResult;
|
||||||
} else {
|
} else {
|
||||||
$sMessage = '';
|
$sMessage = '';
|
||||||
@@ -323,18 +263,13 @@ class OutputDocument extends BaseOutputDocument
|
|||||||
$oOutputDocument = OutputDocumentPeer::retrieveByPK($sOutDocUid);
|
$oOutputDocument = OutputDocumentPeer::retrieveByPK($sOutDocUid);
|
||||||
|
|
||||||
if (!is_null($oOutputDocument)) {
|
if (!is_null($oOutputDocument)) {
|
||||||
$outputName = $this->getOutDocTitle();
|
|
||||||
$outputDesc = $this->getOutDocDescription();
|
|
||||||
$outputFile = $this->getOutDocFilename();
|
|
||||||
$oConnection->begin();
|
$oConnection->begin();
|
||||||
Content::removeContent('OUT_DOC_TITLE', '', $oOutputDocument->getOutDocUid());
|
Content::removeContent('OUT_DOC_TITLE', '', $oOutputDocument->getOutDocUid());
|
||||||
Content::removeContent('OUT_DOC_DESCRIPTION', '', $oOutputDocument->getOutDocUid());
|
Content::removeContent('OUT_DOC_DESCRIPTION', '', $oOutputDocument->getOutDocUid());
|
||||||
Content::removeContent('OUT_DOC_FILENAME', '', $oOutputDocument->getOutDocUid());
|
Content::removeContent('OUT_DOC_FILENAME', '', $oOutputDocument->getOutDocUid());
|
||||||
Content::removeContent('OUT_DOC_TEMPLATE', '', $oOutputDocument->getOutDocUid());
|
Content::removeContent('OUT_DOC_TEMPLATE', '', $oOutputDocument->getOutDocUid());
|
||||||
$iResult = $oOutputDocument->delete();
|
$iResult = $oOutputDocument->delete();
|
||||||
$oConnection->commit();
|
$oConnectutDocUid.")");
|
||||||
//Add Audit Log
|
|
||||||
G::auditLog("DeleteOuputDocument", "Output Document Name: ".$outputName.", Output Document Uid: ".$sOutDocUid.", Description: ".$outputDesc.", Filename generated: ".$outputFile);
|
|
||||||
|
|
||||||
return $iResult;
|
return $iResult;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user