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 2364-2369 sub TransformMarcToKoha { Link Here
2364
            if( $kohafield =~ /copyrightdate|publicationyear/ ) {
2365
            if( $kohafield =~ /copyrightdate|publicationyear/ ) {
2365
                $value = _adjust_pubyear( $value );
2366
                $value = _adjust_pubyear( $value );
2366
            }
2367
            }
2368
            elsif ( $kohafield eq 'biblio.opac_suppressed' ) {
2369
                # this should always be a boolean
2370
                $value = $value ? 1 : 0;
2371
            }
2367
        }
2372
        }
2368
2373
2369
        next if !defined $value;
2374
        next if !defined $value;
Lines 2595-2600 sub _koha_modify_biblio { Link Here
2595
      ;
2600
      ;
2596
    my $sth = $dbh->prepare($query);
2601
    my $sth = $dbh->prepare($query);
2597
2602
2603
    # it always needs to be defined
2604
    $biblio->{opac_suppressed} //= 0;
2605
2598
    $sth->execute(
2606
    $sth->execute(
2599
        $frameworkcode,        $biblio->{'author'},          $biblio->{'title'},       $biblio->{'subtitle'},
2607
        $frameworkcode,        $biblio->{'author'},          $biblio->{'title'},       $biblio->{'subtitle'},
2600
        $biblio->{'medium'},   $biblio->{'part_number'},     $biblio->{'part_name'},   $biblio->{'unititle'},
2608
        $biblio->{'medium'},   $biblio->{'part_number'},     $biblio->{'part_name'},   $biblio->{'unititle'},
2601
- 

Return to bug 38330