BUG 8503 fixed issue of Dynaform with PM Table
This commit is contained in:
@@ -480,6 +480,7 @@ class AdditionalTables extends BaseAdditionalTables {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sMessage = 'Error, row cannot updated';
|
$sMessage = 'Error, row cannot updated';
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
throw(new Exception('The registry cannot be updated!<br />' . $sMessage));
|
throw(new Exception('The registry cannot be updated!<br />' . $sMessage));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,9 +139,14 @@ try {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// saving the data ina pm table in case that is a new record
|
// saving the data ina pm table in case that is a new record
|
||||||
if (!empty($newValues)){
|
if (!empty($newValues)) {
|
||||||
if(!$oAdditionalTables->saveDataInTable ( $oForm->fields [$oForm->fields [$sField]->pmconnection]->pmtable, $newValues))
|
$id = key($newValues);
|
||||||
$oAdditionalTables->updateDataInTable( $oForm->fields [$oForm->fields [$sField]->pmconnection]->pmtable, $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
|
//save data
|
||||||
$aData = array ();
|
$aData = array ();
|
||||||
|
|||||||
Reference in New Issue
Block a user