This commit is contained in:
Julio Cesar Laura Avendaño
2019-08-22 09:37:25 -04:00
parent 7854275d5d
commit ab7e66a01f
13 changed files with 213 additions and 492 deletions

View File

@@ -86,31 +86,6 @@ try {
G::RenderPage( 'publish', 'blank' );
die();
break;
case 'JRXML':
break;
case 'ACROFORM':
$type = $aFields['OUT_DOC_TYPE'];
if ($type == 'JRXML') {
$extension = 'jrxml';
}
if ($type == 'ACROFORM') {
$extension = 'pdf';
}
// The ereg_replace function has been DEPRECATED as of PHP 5.3.0.
// $downFileName = ereg_replace('[^A-Za-z0-9_]', '_', $aFields['OUT_DOC_TITLE'] ) . '.' . $extension;
$downFileName = preg_replace( '/[^A-Za-z0-9_]/i', '_', $aFields['OUT_DOC_TITLE'] ) . '.' . $extension;
$filename = PATH_DYNAFORM . $aFields['PRO_UID'] . PATH_SEP . $aFields['OUT_DOC_UID'] . '.' . $extension;
if (file_exists( $filename )) {
$aFields['FILENAME'] = $downFileName;
} else {
$aFields['FILENAME'] = '';
}
$aFields['FILELINK'] = '../outputdocs/downloadFile?' . $aFields['OUT_DOC_UID'];
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'outputdocs/outputdocsUploadFile', '', $aFields, '../outputdocs/uploadFile' );
$G_PUBLISH->AddContent( 'view', 'outputdocs/editJrxml' );
break;
}
G::RenderPage( 'publish', 'raw' );
} catch (Exception $oException) {