Bug 3264 UnCloneField() / minus button in MARC editor can clear all subfields (author...
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 19 Jan 2012 08:50:03 +0000 (09:50 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 16 Feb 2012 17:52:46 +0000 (18:52 +0100)
commit795dc61f7526c3810173139004c741dc8c810382
tree0769b97c07f0a012beaed4404ac72a6c5b44c190
parent1d7262838077543af4dc8afde7e43188c0c432c4
Bug 3264 UnCloneField() / minus button in MARC editor can clear all subfields (authorities AND biblio)

All subfields following the removed subfield were not saved.
Problem is in C4/Biblio routine TransformHtmlToMarc.
If the field is emptied, the param list contains a code param but no subfield
param. The while loop handling the subfields could not handle that. Also added
a FIXME because the whole routine depends on an assumption about the order of
cgi parameters that is not strictly guaranteed.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
I was unable to replicate the problem, but can confirm that the patch does
not break anything under any of the following platforms/browsers:
Mac OS X 10.6.8:
Chrome 16.0.912.77
Firefox 9.0.1

Windows 7:
Firefox 3.6.3
Firefox 9.0.1
IE 8.0.7600.16385

Ubuntu 11.10
Firefox 8.0
Chromium 15.0.874.106 (Developer Build 107270 Linux)

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/Biblio.pm