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

(-)a/Koha/OAI/Server/Identify.pm (-2 / +2 lines)
Lines 28-34 use base ("HTTP::OAI::Identify"); Link Here
28
sub new {
28
sub new {
29
    my ($class, $repository) = @_;
29
    my ($class, $repository) = @_;
30
30
31
    my ($baseURL) = $repository->self_url() =~ /(.*)\?.*/;
31
    my ($baseURL) = C4::Context->preference('OPACBaseURL') . '/cgi-bin/koha/oai.pl';
32
    my $self = $class->SUPER::new(
32
    my $self = $class->SUPER::new(
33
        baseURL             => $baseURL,
33
        baseURL             => $baseURL,
34
        repositoryName      => C4::Context->preference("LibraryName"),
34
        repositoryName      => C4::Context->preference("LibraryName"),
Lines 54-60 sub new { Link Here
54
# will be returned and we will report the fallback 0001-01-01.
54
# will be returned and we will report the fallback 0001-01-01.
55
sub _get_earliest_datestamp {
55
sub _get_earliest_datestamp {
56
    my $dbh = C4::Context->dbh;
56
    my $dbh = C4::Context->dbh;
57
    my ( $earliest ) = $dbh->selectrow_array("SELECT MIN(timestamp) AS earliest FROM biblio" );
57
    my ( $earliest ) = $dbh->selectrow_array("SELECT DATE_FORMAT(MIN(timestamp),'%Y-%m-%dT%H:%i:%sZ') AS earliest FROM biblio" );
58
    return $earliest
58
    return $earliest
59
}
59
}
60
60
(-)a/Koha/OAI/Server/ListMetadataFormats.pm (-3 / +2 lines)
Lines 47-58 sub new { Link Here
47
        $self->metadataFormat( HTTP::OAI::MetadataFormat->new(
47
        $self->metadataFormat( HTTP::OAI::MetadataFormat->new(
48
            metadataPrefix    => 'marc21',
48
            metadataPrefix    => 'marc21',
49
            schema            => 'http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd',
49
            schema            => 'http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd',
50
            metadataNamespace => 'http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim'
50
            metadataNamespace => 'http://www.loc.gov/MARC21/slim'
51
        ) );
51
        ) );
52
        $self->metadataFormat( HTTP::OAI::MetadataFormat->new(
52
        $self->metadataFormat( HTTP::OAI::MetadataFormat->new(
53
            metadataPrefix    => 'marcxml',
53
            metadataPrefix    => 'marcxml',
54
            schema            => 'http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd',
54
            schema            => 'http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd',
55
            metadataNamespace => 'http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim'
55
            metadataNamespace => 'http://www.loc.gov/MARC21/slim'
56
        ) );
56
        ) );
57
    }
57
    }
58
58
59
- 

Return to bug 21106