BUG 6357 this bug was fixed

This issue is happening, this is happening when you create a output document and go back to previous step or leave a case, it created a duplicates and it shows function ereg_replace() is deprecated. I have fixed these and it's working fine, however there are some deprecated errors which are into ..thirdparty/html2ps_pdf, then we are going to wait the solucion from html2ps_pdf
This commit is contained in:
Carlos Pacha
2011-04-05 17:19:09 -04:00
parent 8260c395a2
commit 6dfc05da04
2 changed files with 9 additions and 5 deletions

View File

@@ -1091,8 +1091,8 @@ function PMFGenerateOutputDocument($outputID) {
$oOutputDocument = new OutputDocument(); $oOutputDocument = new OutputDocument();
$aOD = $oOutputDocument->load($outputID); $aOD = $oOutputDocument->load($outputID);
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] ); $Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
$_GET['UID']=($aOD['OUT_DOC_VERSIONING'])?$_GET['UID']:$aOD['OUT_DOC_UID'];
$sFilename = ereg_replace('[^A-Za-z0-9_]', '_', G::replaceDataField($aOD['OUT_DOC_FILENAME'], $Fields['APP_DATA'])); $sFilename = preg_replace('[^A-Za-z0-9_]', '_', G::replaceDataField($aOD['OUT_DOC_FILENAME'], $Fields['APP_DATA']));
require_once 'classes/model/AppFolder.php'; require_once 'classes/model/AppFolder.php';
require_once 'classes/model/AppDocument.php'; require_once 'classes/model/AppDocument.php';

View File

@@ -57,12 +57,12 @@ if ($_SESSION ['TRIGGER_DEBUG'] ['NUM_TRIGGERS'] != 0) {
$_SESSION ['TRIGGER_DEBUG'] ['TRIGGERS_NAMES'] = $oCase->getTriggerNames ( $triggers ); $_SESSION ['TRIGGER_DEBUG'] ['TRIGGERS_NAMES'] = $oCase->getTriggerNames ( $triggers );
$_SESSION ['TRIGGER_DEBUG'] ['TRIGGERS_VALUES'] = $triggers; $_SESSION ['TRIGGER_DEBUG'] ['TRIGGERS_VALUES'] = $triggers;
} }
/*
if ($_SESSION ['TRIGGER_DEBUG'] ['NUM_TRIGGERS'] != 0) { if ($_SESSION ['TRIGGER_DEBUG'] ['NUM_TRIGGERS'] != 0) {
//Execute after triggers - Start //Execute after triggers - Start
$Fields ['APP_DATA'] = $oCase->ExecuteTriggers ( $_SESSION ['TASK'], 'DYNAFORM', $_GET ['UID'], 'AFTER', $Fields ['APP_DATA'] ); $Fields ['APP_DATA'] = $oCase->ExecuteTriggers ( $_SESSION ['TASK'], 'DYNAFORM', $_GET ['UID'], 'AFTER', $Fields ['APP_DATA'] );
//Execute after triggers - End //Execute after triggers - End
} }*/
//save data in PM Tables if necessary //save data in PM Tables if necessary
$newValues = array (); $newValues = array ();
@@ -220,7 +220,11 @@ if (isset ( $_FILES ['form'] )) {
} }
} }
} }
if ($_SESSION ['TRIGGER_DEBUG'] ['NUM_TRIGGERS'] != 0) {
//Execute after triggers - Start
$Fields ['APP_DATA'] = $oCase->ExecuteTriggers ( $_SESSION ['TASK'], 'DYNAFORM', $_GET ['UID'], 'AFTER', $Fields ['APP_DATA'] );
//Execute after triggers - End
}
//go to the next step //go to the next step
$aNextStep = $oCase->getNextStep ( $_SESSION ['PROCESS'], $_SESSION ['APPLICATION'], $_SESSION ['INDEX'], $_SESSION ['STEP_POSITION'] ); $aNextStep = $oCase->getNextStep ( $_SESSION ['PROCESS'], $_SESSION ['APPLICATION'], $_SESSION ['INDEX'], $_SESSION ['STEP_POSITION'] );
if (isset ( $_GET ['_REFRESH_'] )) { if (isset ( $_GET ['_REFRESH_'] )) {