BUG 5979 "Cases are overwritten with data from another..." SOlVED
- problem fixed passing the app uid by GET and acomparing with the session data so, if there were differents a message to re-open case will be throw
This commit is contained in:
@@ -23,6 +23,13 @@
|
||||
*
|
||||
*/
|
||||
//validate the data post
|
||||
|
||||
try {
|
||||
|
||||
if ($_GET['APP_UID'] !== $_SESSION ['APPLICATION']) {
|
||||
throw new Exception(G::LoadTranslation('ID_INVALID_APPLICATION_ID_MSG', array('<a href=\''.$_SERVER['HTTP_REFERER'].'\'>{1}</a>', G::LoadTranslation('ID_REOPEN'))));
|
||||
}
|
||||
|
||||
$oForm = new Form ( $_SESSION ['PROCESS'] . '/' . $_GET ['UID'], PATH_DYNAFORM );
|
||||
$oForm->validatePost ();
|
||||
|
||||
@@ -108,12 +115,14 @@ foreach ( $_POST ['form'] as $sField => $sAux ) {
|
||||
} catch ( Exception $oError ) {
|
||||
//Nothing
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
try {
|
||||
// assembling the field list in order to save the data ina new record of a pm table
|
||||
if (empty($newValues)){
|
||||
$newValues = $aValues;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
foreach ($aValues as $aValueKey=>$aValueCont) {
|
||||
if (trim($newValues[$aValueKey])==''){
|
||||
$newValues[$aValueKey] = $aValueCont;
|
||||
@@ -121,7 +130,6 @@ foreach ( $_POST ['form'] as $sField => $sAux ) {
|
||||
}
|
||||
}
|
||||
//$oAdditionalTables->saveDataInTable ( $oForm->fields [$oForm->fields [$sField]->pmconnection]->pmtable, $aValues );
|
||||
|
||||
} catch ( Exception $oError ) {
|
||||
//Nothing
|
||||
}
|
||||
@@ -155,8 +163,6 @@ if (isset ( $_FILES ['form'] )) {
|
||||
if ($_FILES ['form'] ['error'] [$sFieldName] == 0) {
|
||||
$oAppDocument = new AppDocument ( );
|
||||
|
||||
|
||||
|
||||
if ( isset ( $_POST ['INPUTS'] [$sFieldName] ) && $_POST ['INPUTS'] [$sFieldName] != '' ) {
|
||||
require_once ('classes/model/AppFolder.php');
|
||||
require_once ('classes/model/InputDocument.php');
|
||||
@@ -184,7 +190,8 @@ if (isset ( $_FILES ['form'] )) {
|
||||
'FOLDER_UID' => $folderId,
|
||||
'APP_DOC_TAGS' => $fileTags
|
||||
);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$aFields = array (
|
||||
'APP_UID' => $_SESSION ['APPLICATION'],
|
||||
'DEL_INDEX' => $_SESSION ['INDEX'],
|
||||
@@ -251,3 +258,13 @@ if ($missing_req_values = $oForm->validateRequiredFields ( $_POST ['form'], $oJS
|
||||
|
||||
G::header ( 'location: ' . $aNextStep ['PAGE'] );
|
||||
|
||||
}
|
||||
catch(Exception $e) {
|
||||
|
||||
$G_PUBLISH = new Publisher;
|
||||
$aMessage = array();
|
||||
$aMessage['MESSAGE'] = $e->getMessage();
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
die;
|
||||
}
|
||||
@@ -218,7 +218,7 @@ $uidf=$_GET['UID'];
|
||||
$oDbConnections->loadAdditionalConnections();
|
||||
$_SESSION['CURRENT_DYN_UID'] = $_GET['UID'];
|
||||
|
||||
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS']. '/' . $_GET['UID'], '', $Fields['APP_DATA'], 'cases_SaveData?UID=' . $_GET['UID'], '', (strtolower($oStep->getStepMode()) != 'edit' ? strtolower($oStep->getStepMode()) : ''));
|
||||
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS']. '/' . $_GET['UID'], '', $Fields['APP_DATA'], 'cases_SaveData?UID=' . $_GET['UID'] . '&APP_UID=' . $_SESSION['APPLICATION'], '', (strtolower($oStep->getStepMode()) != 'edit' ? strtolower($oStep->getStepMode()) : ''));
|
||||
break;
|
||||
|
||||
case 'INPUT_DOCUMENT':
|
||||
|
||||
Reference in New Issue
Block a user