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

(-)a/C4/Biblio.pm (-15 / +22 lines)
Lines 229-248 sub AddBiblio { Link Here
229
229
230
                my $biblio = Koha::Biblio->new(
230
                my $biblio = Koha::Biblio->new(
231
                    {
231
                    {
232
                        frameworkcode => $frameworkcode,
232
                        frameworkcode   => $frameworkcode,
233
                        author        => $olddata->{author},
233
                        author          => $olddata->{author},
234
                        title         => $olddata->{title},
234
                        title           => $olddata->{title},
235
                        subtitle      => $olddata->{subtitle},
235
                        subtitle        => $olddata->{subtitle},
236
                        medium        => $olddata->{medium},
236
                        medium          => $olddata->{medium},
237
                        part_number   => $olddata->{part_number},
237
                        part_number     => $olddata->{part_number},
238
                        part_name     => $olddata->{part_name},
238
                        part_name       => $olddata->{part_name},
239
                        unititle      => $olddata->{unititle},
239
                        unititle        => $olddata->{unititle},
240
                        notes         => $olddata->{notes},
240
                        notes           => $olddata->{notes},
241
                        serial        => $olddata->{serial},
241
                        serial          => $olddata->{serial},
242
                        seriestitle   => $olddata->{seriestitle},
242
                        seriestitle     => $olddata->{seriestitle},
243
                        copyrightdate => $olddata->{copyrightdate},
243
                        copyrightdate   => $olddata->{copyrightdate},
244
                        datecreated   => \'NOW()',
244
                        datecreated     => \'NOW()',
245
                        abstract      => $olddata->{abstract},
245
                        abstract        => $olddata->{abstract},
246
                        opac_suppressed => $olddata->{opac_suppressed},
246
                    }
247
                    }
247
                )->store;
248
                )->store;
248
                $biblionumber = $biblio->biblionumber;
249
                $biblionumber = $biblio->biblionumber;
Lines 2416-2421 sub TransformMarcToKoha { Link Here
2416
            # Additional polishing for individual kohafields
2417
            # Additional polishing for individual kohafields
2417
            if ( $kohafield =~ /copyrightdate|publicationyear/ ) {
2418
            if ( $kohafield =~ /copyrightdate|publicationyear/ ) {
2418
                $value = _adjust_pubyear($value);
2419
                $value = _adjust_pubyear($value);
2420
            } elsif ( $kohafield eq 'biblio.opac_suppressed' ) {
2421
2422
                # this should always be a boolean
2423
                $value = $value ? 1 : 0;
2419
            }
2424
            }
2420
        }
2425
        }
2421
2426
Lines 2655-2660 sub _koha_modify_biblio { Link Here
2655
        ;
2660
        ;
2656
    my $sth = $dbh->prepare($query);
2661
    my $sth = $dbh->prepare($query);
2657
2662
2663
    # it always needs to be defined
2664
    $biblio->{opac_suppressed} //= 0;
2665
2658
    $sth->execute(
2666
    $sth->execute(
2659
        $frameworkcode,      $biblio->{'author'},      $biblio->{'title'},     $biblio->{'subtitle'},
2667
        $frameworkcode,      $biblio->{'author'},      $biblio->{'title'},     $biblio->{'subtitle'},
2660
        $biblio->{'medium'}, $biblio->{'part_number'}, $biblio->{'part_name'}, $biblio->{'unititle'},
2668
        $biblio->{'medium'}, $biblio->{'part_number'}, $biblio->{'part_name'}, $biblio->{'unititle'},
2661
- 

Return to bug 38330