PMC-1094
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user