View | Details | Raw Unified | Return to bug 5683
Collapse All | Expand All

(-)a/C4/Biblio.pm (-9 / +10 lines)
Lines 295-300 sub ModBiblio { Link Here
295
        logaction( "CATALOGUING", "MODIFY", $biblionumber, "BEFORE=>" . $newrecord->as_formatted );
295
        logaction( "CATALOGUING", "MODIFY", $biblionumber, "BEFORE=>" . $newrecord->as_formatted );
296
    }
296
    }
297
297
298
    # Cleaning up invalid fields must be done early or SetUTF8Flag is liable to
299
    # throw an exception which probably won't be handled.
300
    foreach my $field ($record->fields()) {
301
        if (! $field->is_control_field()) {
302
            if (scalar($field->subfields()) == 0 || (scalar($field->subfields()) == 1 && $field->subfield('9'))) {
303
                $record->delete_field($field);
304
            }
305
        }
306
    }
307
298
    SetUTF8Flag($record);
308
    SetUTF8Flag($record);
299
    my $dbh = C4::Context->dbh;
309
    my $dbh = C4::Context->dbh;
300
310
Lines 334-347 sub ModBiblio { Link Here
334
        $record->append_fields($field);
344
        $record->append_fields($field);
335
    }
345
    }
336
346
337
    foreach my $field ($record->fields()) {
338
        if (! $field->is_control_field()) {
339
            if (scalar($field->subfields()) == 0) {
340
                $record->delete_fields($field);
341
            }
342
        }
343
    }
344
345
    # update biblionumber and biblioitemnumber in MARC
347
    # update biblionumber and biblioitemnumber in MARC
346
    # FIXME - this is assuming a 1 to 1 relationship between
348
    # FIXME - this is assuming a 1 to 1 relationship between
347
    # biblios and biblioitems
349
    # biblios and biblioitems
348
- 

Return to bug 5683