|
Lines 70-76
sub fetch_bib {
Link Here
|
| 70 |
my $record; |
70 |
my $record; |
| 71 |
my $exception; |
71 |
my $exception; |
| 72 |
my $invalid_metadata = 0; |
72 |
my $invalid_metadata = 0; |
| 73 |
eval { $record = $biblio->metadata->record( { embed_items => scalar $query->param('items') } ) }; |
73 |
eval { $record = $biblio->metadata_record( { embed_items => scalar $query->param('items') } ) }; |
| 74 |
if ($@) { |
74 |
if ($@) { |
| 75 |
$exception = $@; |
75 |
$exception = $@; |
| 76 |
$exception->rethrow unless ( $exception->isa('Koha::Exceptions::Metadata::Invalid') ); |
76 |
$exception->rethrow unless ( $exception->isa('Koha::Exceptions::Metadata::Invalid') ); |
|
Lines 126-132
sub update_bib {
Link Here
|
| 126 |
|
126 |
|
| 127 |
C4::Biblio::ModBiblio( $record, $biblionumber, $frameworkcode ); |
127 |
C4::Biblio::ModBiblio( $record, $biblionumber, $frameworkcode ); |
| 128 |
my $biblio = Koha::Biblios->find( $biblionumber ); |
128 |
my $biblio = Koha::Biblios->find( $biblionumber ); |
| 129 |
my $new_record = $biblio->metadata->record({ embed_items => scalar $query->url_param('items') }); |
129 |
my $new_record = $biblio->metadata_record({ embed_items => scalar $query->url_param('items') }); |
| 130 |
|
130 |
|
| 131 |
$result->{'status'} = "ok"; |
131 |
$result->{'status'} = "ok"; |
| 132 |
$result->{'biblionumber'} = $biblionumber; |
132 |
$result->{'biblionumber'} = $biblionumber; |