bugfix/HOR-2067

This commit is contained in:
Paula Quispe
2017-03-21 15:02:53 -04:00
parent 3ebf5eea42
commit 873c8d0723
5 changed files with 28 additions and 4 deletions

View File

@@ -69,7 +69,10 @@ G::LoadClass( 'pmScript' );
G::LoadClass( 'case' ); G::LoadClass( 'case' );
G::LoadClass( 'derivation' ); G::LoadClass( 'derivation' );
//require_once 'classes/model/Event.php'; //If didn't is not submitted any variable and the $_POST is empty
if (!isset($_POST['form'])) {
$_POST['form'] = array();
}
/* GET , POST & $_SESSION Vars */ /* GET , POST & $_SESSION Vars */
/* Process the info */ /* Process the info */

View File

@@ -57,6 +57,11 @@ if (isset( $_SESSION['STEP_POSITION'] )) {
unset( $_SESSION['STEP_POSITION'] ); unset( $_SESSION['STEP_POSITION'] );
} }
//If didn't is not submitted any variable and the $_POST is empty
if (!isset($_POST['form'])) {
$_POST['form'] = array();
}
/* Process */ /* Process */
try { try {
$oCase = new Cases(); $oCase = new Cases();

View File

@@ -103,6 +103,11 @@ try {
$arrayVariableDocumentToDelete = []; $arrayVariableDocumentToDelete = [];
//If didn't is not submitted any variable and the $_POST is empty
if (!isset($_POST['form'])) {
$_POST['form'] = array();
}
if (array_key_exists('__VARIABLE_DOCUMENT_DELETE__', $_POST['form'])) { if (array_key_exists('__VARIABLE_DOCUMENT_DELETE__', $_POST['form'])) {
if (is_array($_POST['form']['__VARIABLE_DOCUMENT_DELETE__']) && !empty($_POST['form']['__VARIABLE_DOCUMENT_DELETE__'])) { if (is_array($_POST['form']['__VARIABLE_DOCUMENT_DELETE__']) && !empty($_POST['form']['__VARIABLE_DOCUMENT_DELETE__'])) {
$arrayVariableDocumentToDelete = $_POST['form']['__VARIABLE_DOCUMENT_DELETE__']; $arrayVariableDocumentToDelete = $_POST['form']['__VARIABLE_DOCUMENT_DELETE__'];

View File

@@ -27,6 +27,11 @@ $dynaForm = DynaformPeer::retrieveByPK($_GET["UID"]);
$flagDynaFormNewVersion = !is_null($dynaForm) && $dynaForm->getDynVersion() == 2; $flagDynaFormNewVersion = !is_null($dynaForm) && $dynaForm->getDynVersion() == 2;
//If didn't is not submitted any variable and the $_POST is empty
if (!isset($_POST['form'])) {
$_POST['form'] = array();
}
if ($flagDynaFormNewVersion) { if ($flagDynaFormNewVersion) {
$dataForm = $_POST["form"]; $dataForm = $_POST["form"];
} }
@@ -205,8 +210,9 @@ if (isset( $_FILES["form"]["name"] ) && count( $_FILES["form"]["name"] ) > 0) {
} }
} }
} }
//Define the STEP_POSITION
$ex = isset($_GET['ex']) ? $_GET['ex'] : 0;
//go to the next step //go to the next step
$aNextStep = $oCase->getNextSupervisorStep( $_SESSION['PROCESS'], $_SESSION['STEP_POSITION'] ); $aNextStep = $oCase->getNextSupervisorStep( $_SESSION['PROCESS'], $_SESSION['STEP_POSITION'] );
G::header( 'Location: cases_StepToRevise?type=DYNAFORM&ex=' . $_GET['ex'] . '&PRO_UID=' . $_SESSION['PROCESS'] . '&DYN_UID=' . $aNextStep['UID'] . '&APP_UID=' . $_SESSION['APPLICATION'] . '&position=' . $aNextStep['POSITION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] ); G::header( 'Location: cases_StepToRevise?type=DYNAFORM&ex=' . $ex . '&PRO_UID=' . $_SESSION['PROCESS'] . '&DYN_UID=' . $aNextStep['UID'] . '&APP_UID=' . $_SESSION['APPLICATION'] . '&position=' . $aNextStep['POSITION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] );
die(); die();

View File

@@ -43,6 +43,11 @@ try {
$Fields["APP_DATA"] = array_merge( $Fields["APP_DATA"], G::getSystemConstants() ); $Fields["APP_DATA"] = array_merge( $Fields["APP_DATA"], G::getSystemConstants() );
$Fields["APP_DATA"] = array_merge( $Fields["APP_DATA"], $_POST["form"] ); $Fields["APP_DATA"] = array_merge( $Fields["APP_DATA"], $_POST["form"] );
//If didn't is not submitted any variable and the $_POST is empty
if (!isset($_POST['form'])) {
$_POST['form'] = array();
}
//save data in PM Tables if necessary //save data in PM Tables if necessary
$newValues = array (); $newValues = array ();
foreach ($_POST['form'] as $sField => $sAux) { foreach ($_POST['form'] as $sField => $sAux) {