BUG 8503 fixed issue of Dynaform with PM Table

This commit is contained in:
Alvaro Campos
2012-02-22 15:56:11 -04:00
parent 4caa1382ef
commit 54cee71502
2 changed files with 9 additions and 3 deletions

View File

@@ -139,9 +139,14 @@ try {
}
}
// saving the data ina pm table in case that is a new record
if (!empty($newValues)){
if(!$oAdditionalTables->saveDataInTable ( $oForm->fields [$oForm->fields [$sField]->pmconnection]->pmtable, $newValues))
$oAdditionalTables->updateDataInTable( $oForm->fields [$oForm->fields [$sField]->pmconnection]->pmtable, $newValues);
if (!empty($newValues)) {
$id = key($newValues);
while (strlen($id) < 3) {
$id = '_' . $id;
}
if (! $oAdditionalTables->updateDataInTable( $oForm->fields [$oForm->fields[$id]->pmconnection]->pmtable, $newValues) ) {//<--This is to know if it is a new registry on the PM Table
$oAdditionalTables->saveDataInTable( $oForm->fields [$oForm->fields[$id]->pmconnection]->pmtable, $newValues);
}
}
//save data
$aData = array ();