HOR-1471
HOR-1471 HOR-1471
This commit is contained in:
@@ -61,29 +61,29 @@ try {
|
||||
|
||||
switch ($type) {
|
||||
case 'HTML':
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$fcontent = '';
|
||||
$proUid = '';
|
||||
$filename = '';
|
||||
$title = '';
|
||||
require_once 'classes/model/OutputDocument.php';
|
||||
$oOutputDocument = new OutputDocument();
|
||||
if (isset( $_REQUEST['OUT_DOC_UID'] )) {
|
||||
$aFields = $oOutputDocument->load( $_REQUEST['OUT_DOC_UID'] );
|
||||
$fcontent = $aFields['OUT_DOC_TEMPLATE'];
|
||||
$proUid = $aFields['PRO_UID'];
|
||||
$filename = $aFields['OUT_DOC_FILENAME'];
|
||||
$title = $aFields['OUT_DOC_TITLE'];
|
||||
}
|
||||
$aData = Array (
|
||||
'PRO_UID' => $proUid,
|
||||
'OUT_DOC_TEMPLATE' => $fcontent,
|
||||
'FILENAME' => $filename,
|
||||
'OUT_DOC_UID'=> $_REQUEST['OUT_DOC_UID'],
|
||||
'OUT_DOC_TITLE'=> $title,
|
||||
);
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'outputdocs/outputdocs_Edit', '', $aData );
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$fcontent = '';
|
||||
$proUid = '';
|
||||
$filename = '';
|
||||
$title = '';
|
||||
require_once 'classes/model/OutputDocument.php';
|
||||
$oOutputDocument = new OutputDocument();
|
||||
if (isset( $_REQUEST['OUT_DOC_UID'] )) {
|
||||
$aFields = $oOutputDocument->load( $_REQUEST['OUT_DOC_UID'] );
|
||||
$fcontent = $aFields['OUT_DOC_TEMPLATE'];
|
||||
$proUid = $aFields['PRO_UID'];
|
||||
$filename = $aFields['OUT_DOC_FILENAME'];
|
||||
$title = $aFields['OUT_DOC_TITLE'];
|
||||
}
|
||||
$aData = Array (
|
||||
'PRO_UID' => $proUid,
|
||||
'OUT_DOC_TEMPLATE' => $fcontent,
|
||||
'FILENAME' => $filename,
|
||||
'OUT_DOC_UID'=> $_REQUEST['OUT_DOC_UID'],
|
||||
'OUT_DOC_TITLE'=> $title,
|
||||
);
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'outputdocs/outputdocs_Edit', '', $aData );
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
die();
|
||||
break;
|
||||
@@ -98,8 +98,8 @@ try {
|
||||
$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;
|
||||
// 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 )) {
|
||||
@@ -115,6 +115,9 @@ try {
|
||||
}
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
} catch (Exception $oException) {
|
||||
die( $oException->getMessage() );
|
||||
}
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($oException, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
die;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user