Home » Database » DB_DataObject_FormBuilder » Bug #2841
Prevent updates on crosslinks to delete prior entries
Details
| Request #2841 | Prevent updates on crosslinks to delete prior entries |
|---|---|
| Submitted | 2004-11-28 00:33 UTC |
| From | mw21st at php dot net |
| Assigned | justinpatrin |
| Status | Closed |
| Package | DB_DataObject_FormBuilder |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2004-11-28 00:33 UTC] mw21st at php dot net
Description:
------------
When you use crosslinks with FormBuilder and make updates to the crosslinked entries, FB will delete all previous entries in the crosslink table and re-insert the checked entries anew.
This behaviour is okay as long as you store only the linked fields in the crosslink table. When you put in additional information, however, this information is being lost whenever you add or remove an option from the crosslink table, which is not desirable.
Sönke Ruempler has provided a patch to fix this, which can be found here:
http://opensource.21st.de/projects/formbuilder/patches/FormBuilder_SRuempler.phps
[2004-12-17 08:11 UTC] ruempler at topconcepts dot com
Justin,
there is a bug that I did not notice in the patch: if no checkbox is checked, there is not var/array from the outside and foreach throws warnings, should be fixed with som,ething like this:
$fieldvalues = &$values['__crossLink_'.$crossLink['table']];
if (!is_array($fieldvalues)) {
$fieldvalues = array();
}
soenke
[2004-12-23 16:40 UTC] ruempler at topconcepts dot de
Thx for the fix Justin, but there should be no E_NOTICE, because I assigned the value per reference ;-) Happy X-Mas ;-)