Merged in darojas/processmaker (pull request #343)
Se modifica POST outputdocument, warning cuando se manda contenido vacio (DOMDocument::loadHTML error). Se agrega validacion para PUT project OUTPUT DOCUMENTS
This commit is contained in:
@@ -408,7 +408,13 @@ class OutputDocument
|
||||
switch ($aProperties['report_generator']) {
|
||||
case 'TCPDF':
|
||||
$o = new \OutputDocument();
|
||||
$o->generateTcpdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
||||
if (strlen($sContent) == 0) {
|
||||
libxml_use_internal_errors(true);
|
||||
$o->generateTcpdf($sUID, $aFields, $sPath, $sFilename, ' ', $sLandscape, $aProperties);
|
||||
libxml_use_internal_errors(false);
|
||||
} else {
|
||||
$o->generateTcpdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
||||
}
|
||||
break;
|
||||
case 'HTML2PDF':
|
||||
default:
|
||||
|
||||
@@ -306,6 +306,9 @@ class OutputDocument
|
||||
if ($oOutputDocument->validate()) {
|
||||
$oConnection->begin();
|
||||
if (isset($aData['OUT_DOC_TITLE'])) {
|
||||
if ($this->existsTitle($sProcessUID, $aData["OUT_DOC_TITLE"])) {
|
||||
throw (new \Exception(\G::LoadTranslation("ID_OUTPUT_NOT_SAVE")));
|
||||
}
|
||||
$oOutputDocument->setOutDocTitle($aData['OUT_DOC_TITLE']);
|
||||
}
|
||||
if (isset($aData['OUT_DOC_DESCRIPTION'])) {
|
||||
|
||||
Reference in New Issue
Block a user