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

(-)a/C4/Biblio.pm (-8 / +8 lines)
Lines 57-69 BEGIN { Link Here
57
57
58
    # to get something
58
    # to get something
59
    push @EXPORT, qw(
59
    push @EXPORT, qw(
60
      &GetBiblio
60
      GetBiblio
61
      &GetBiblioData
61
      GetBiblioData
62
      &GetBiblioItemData
62
      GetMarcBiblio
63
      &GetBiblioItemInfosOf
63
      GetBiblioItemData
64
      &GetBiblioItemByBiblioNumber
64
      GetBiblioItemInfosOf
65
      &GetBiblioFromItemNumber
65
      GetBiblioItemByBiblioNumber
66
      &GetBiblionumberFromItemnumber
66
      GetBiblioFromItemNumber
67
      GetBiblionumberFromItemnumber
67
68
68
      &GetRecordValue
69
      &GetRecordValue
69
      &GetFieldMapping
70
      &GetFieldMapping
Lines 77-83 BEGIN { Link Here
77
      &GetMarcISBN
78
      &GetMarcISBN
78
      &GetMarcISSN
79
      &GetMarcISSN
79
      &GetMarcSubjects
80
      &GetMarcSubjects
80
      &GetMarcBiblio
81
      &GetMarcAuthors
81
      &GetMarcAuthors
82
      &GetMarcSeries
82
      &GetMarcSeries
83
      &GetMarcHosts
83
      &GetMarcHosts
(-)a/opac/oai.pl (-4 / +9 lines)
Lines 247-253 package C4::OAI::GetRecord; Link Here
247
use strict;
247
use strict;
248
use warnings;
248
use warnings;
249
use HTTP::OAI;
249
use HTTP::OAI;
250
use C4::Biblio;
250
use C4::OAI::Sets;
251
use C4::OAI::Sets;
252
use MARC::File::XML;
251
253
252
use base ("HTTP::OAI::GetRecord");
254
use base ("HTTP::OAI::GetRecord");
253
255
Lines 259-272 sub new { Link Here
259
261
260
    my $dbh = C4::Context->dbh;
262
    my $dbh = C4::Context->dbh;
261
    my $sth = $dbh->prepare("
263
    my $sth = $dbh->prepare("
262
        SELECT marcxml, timestamp
264
        SELECT timestamp
263
        FROM   biblioitems
265
        FROM   biblioitems
264
        WHERE  biblionumber=? " );
266
        WHERE  biblionumber=? " );
265
    my $prefix = $repository->{koha_identifier} . ':';
267
    my $prefix = $repository->{koha_identifier} . ':';
266
    my ($biblionumber) = $args{identifier} =~ /^$prefix(.*)/;
268
    my ($biblionumber) = $args{identifier} =~ /^$prefix(.*)/;
267
    $sth->execute( $biblionumber );
269
    $sth->execute( $biblionumber );
268
    my ($marcxml, $timestamp);
270
    my ($timestamp);
269
    unless ( ($marcxml, $timestamp) = $sth->fetchrow ) {
271
    unless ( ($timestamp) = $sth->fetchrow ) {
270
        return HTTP::OAI::Response->new(
272
        return HTTP::OAI::Response->new(
271
            requestURL  => $repository->self_url(),
273
            requestURL  => $repository->self_url(),
272
            errors      => [ new HTTP::OAI::Error(
274
            errors      => [ new HTTP::OAI::Error(
Lines 276-281 sub new { Link Here
276
        );
278
        );
277
    }
279
    }
278
280
281
    # We fetch it using this method, rather than the database directly,
282
    # so it'll include the item data
283
    my $record = GetMarcBiblio($biblionumber, 1);
284
    my $marcxml = $record->as_xml();
279
    my $oai_sets = GetOAISetsBiblio($biblionumber);
285
    my $oai_sets = GetOAISetsBiblio($biblionumber);
280
    my @setSpecs;
286
    my @setSpecs;
281
    foreach (@$oai_sets) {
287
    foreach (@$oai_sets) {
282
- 

Return to bug 12252