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
|
//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 = new Form ( $_SESSION ['PROCESS'] . '/' . $_GET ['UID'], PATH_DYNAFORM );
|
||||||
$oForm->validatePost ();
|
$oForm->validatePost ();
|
||||||
|
|
||||||
@@ -108,12 +115,14 @@ foreach ( $_POST ['form'] as $sField => $sAux ) {
|
|||||||
} catch ( Exception $oError ) {
|
} catch ( Exception $oError ) {
|
||||||
//Nothing
|
//Nothing
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
try {
|
try {
|
||||||
// assembling the field list in order to save the data ina new record of a pm table
|
// assembling the field list in order to save the data ina new record of a pm table
|
||||||
if (empty($newValues)){
|
if (empty($newValues)){
|
||||||
$newValues = $aValues;
|
$newValues = $aValues;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
foreach ($aValues as $aValueKey=>$aValueCont) {
|
foreach ($aValues as $aValueKey=>$aValueCont) {
|
||||||
if (trim($newValues[$aValueKey])==''){
|
if (trim($newValues[$aValueKey])==''){
|
||||||
$newValues[$aValueKey] = $aValueCont;
|
$newValues[$aValueKey] = $aValueCont;
|
||||||
@@ -121,7 +130,6 @@ foreach ( $_POST ['form'] as $sField => $sAux ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//$oAdditionalTables->saveDataInTable ( $oForm->fields [$oForm->fields [$sField]->pmconnection]->pmtable, $aValues );
|
//$oAdditionalTables->saveDataInTable ( $oForm->fields [$oForm->fields [$sField]->pmconnection]->pmtable, $aValues );
|
||||||
|
|
||||||
} catch ( Exception $oError ) {
|
} catch ( Exception $oError ) {
|
||||||
//Nothing
|
//Nothing
|
||||||
}
|
}
|
||||||
@@ -155,8 +163,6 @@ if (isset ( $_FILES ['form'] )) {
|
|||||||
if ($_FILES ['form'] ['error'] [$sFieldName] == 0) {
|
if ($_FILES ['form'] ['error'] [$sFieldName] == 0) {
|
||||||
$oAppDocument = new AppDocument ( );
|
$oAppDocument = new AppDocument ( );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ( isset ( $_POST ['INPUTS'] [$sFieldName] ) && $_POST ['INPUTS'] [$sFieldName] != '' ) {
|
if ( isset ( $_POST ['INPUTS'] [$sFieldName] ) && $_POST ['INPUTS'] [$sFieldName] != '' ) {
|
||||||
require_once ('classes/model/AppFolder.php');
|
require_once ('classes/model/AppFolder.php');
|
||||||
require_once ('classes/model/InputDocument.php');
|
require_once ('classes/model/InputDocument.php');
|
||||||
@@ -184,7 +190,8 @@ if (isset ( $_FILES ['form'] )) {
|
|||||||
'FOLDER_UID' => $folderId,
|
'FOLDER_UID' => $folderId,
|
||||||
'APP_DOC_TAGS' => $fileTags
|
'APP_DOC_TAGS' => $fileTags
|
||||||
);
|
);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$aFields = array (
|
$aFields = array (
|
||||||
'APP_UID' => $_SESSION ['APPLICATION'],
|
'APP_UID' => $_SESSION ['APPLICATION'],
|
||||||
'DEL_INDEX' => $_SESSION ['INDEX'],
|
'DEL_INDEX' => $_SESSION ['INDEX'],
|
||||||
@@ -251,3 +258,13 @@ if ($missing_req_values = $oForm->validateRequiredFields ( $_POST ['form'], $oJS
|
|||||||
|
|
||||||
G::header ( 'location: ' . $aNextStep ['PAGE'] );
|
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();
|
$oDbConnections->loadAdditionalConnections();
|
||||||
$_SESSION['CURRENT_DYN_UID'] = $_GET['UID'];
|
$_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;
|
break;
|
||||||
|
|
||||||
case 'INPUT_DOCUMENT':
|
case 'INPUT_DOCUMENT':
|
||||||
|
|||||||
Reference in New Issue
Block a user