diff --git a/workflow/engine/classes/model/InputDocument.php b/workflow/engine/classes/model/InputDocument.php index b19036ad8..d6004dd16 100755 --- a/workflow/engine/classes/model/InputDocument.php +++ b/workflow/engine/classes/model/InputDocument.php @@ -150,8 +150,15 @@ class InputDocument extends BaseInputDocument 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; + $inputDocMaxFileSize = ""; + if(!empty($aData['INP_DOC_MAX_FILESIZE'])){ + $inputDocMaxFileSize = $aData['INP_DOC_MAX_FILESIZE']? $aData['INP_DOC_MAX_FILESIZE'].' '.$aData['INP_DOC_MAX_FILESIZE_UNIT'] : "256 MB"; + $inputDocMaxFileSize = ", Maximum Input Document file size: ".$inputDocMaxFileSize; + } + if(!empty($aData['INP_DOC_MAX_FILESIZE'])){ + $description .= ", Extensions: ".$aData['INP_DOC_TYPE_FILE']; + } + $description .= $inputDocMaxFileSize; G::auditLog("CreateInputDocument", $description); return $aData['INP_DOC_UID']; @@ -217,8 +224,15 @@ class InputDocument extends BaseInputDocument 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; + $inputDocMaxFileSize = ""; + if(!empty($aData['INP_DOC_MAX_FILESIZE'])){ + $inputDocMaxFileSize = $aData['INP_DOC_MAX_FILESIZE']? $aData['INP_DOC_MAX_FILESIZE'].' '.$aData['INP_DOC_MAX_FILESIZE_UNIT'] : "256 MB"; + $inputDocMaxFileSize = ", Maximum Input Document file size: ".$inputDocMaxFileSize; + } + if(!empty($aData['INP_DOC_MAX_FILESIZE'])){ + $description .= ", Extensions: ".$aData['INP_DOC_TYPE_FILE']; + } + $description .= $inputDocMaxFileSize; G::auditLog("UpdateInputDocument", $description); return $iResult; diff --git a/workflow/engine/classes/model/OutputDocument.php b/workflow/engine/classes/model/OutputDocument.php index d177b31f3..47d48d602 100755 --- a/workflow/engine/classes/model/OutputDocument.php +++ b/workflow/engine/classes/model/OutputDocument.php @@ -178,7 +178,12 @@ class OutputDocument extends BaseOutputDocument 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(!empty($aData['OUT_DOC_REPORT_GENERATOR'])){ + $description .= ", Report Generator: ". $aData['OUT_DOC_REPORT_GENERATOR']; + } + if(!empty($aData['OUT_DOC_GENERATE'])){ + $description .= ", Output Document to Generate: ".$aData['OUT_DOC_GENERATE']; + } if($aData['OUT_DOC_PDF_SECURITY_ENABLED']==0){ $pdfSecurity = 'Disabled'; }else{ @@ -194,12 +199,14 @@ class OutputDocument extends BaseOutputDocument 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(!empty($aData['OUT_DOC_OPEN_TYPE'])){ + 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("CreateOutputDocument", $description); return $aData['OUT_DOC_UID']; @@ -261,7 +268,12 @@ class OutputDocument extends BaseOutputDocument 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(!empty($aData['OUT_DOC_REPORT_GENERATOR'])){ + $description .= ", Report Generator: ". $aData['OUT_DOC_REPORT_GENERATOR']; + } + if(!empty($aData['OUT_DOC_REPORT_GENERATOR'])){ + $description .= ", Output Document to Generate: ".$aData['OUT_DOC_GENERATE']; + } if($aData['OUT_DOC_PDF_SECURITY_ENABLED']==0){ $pdfSecurity = 'Disabled'; }else{ @@ -277,12 +289,14 @@ class OutputDocument extends BaseOutputDocument 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(!empty($aData['OUT_DOC_OPEN_TYPE'])){ + 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]"; }