[Koha] OAI-PMH in 3.22

Pedro Amorim pjamorim91 at gmail.com
Sat Apr 23 02:22:38 NZST 2016


Hello Galen,

Thank you very much!

Pedro Amorim

2016-04-05 16:31 GMT+00:00 Galen Charlton <gmc at esilibrary.com>:

> Hi,
>
> On Tue, Apr 5, 2016 at 10:37 AM, Pedro Amorim <pjamorim91 at gmail.com>
> wrote:
> > Leads to me believe the file is the same but is now using the
> > 'marc:collection' condition instead of the 'marc:record' condition.
>
> I believe you are correct. As a result of the change made in bug
> 12252, the OAI code now uses GetMarcBiblio() followed by
> MARC::File::XML->as_xml() to fetch each MARCXML document, rather than
> querying the biblioitems.marcxml column directly.  As a consequence,
> the XML document that's returned is now wrapped in a marc:collection
> element.
>
> The diff I've pasted below my signature restores the previous behavior
>
> [1] https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12252
>
> Regards,
>
> Galen
> --
> Galen Charlton
> Infrastructure and Added Services Manager
> Equinox Software, Inc. / Open Your Library
> email:  gmc at esilibrary.com
> direct: +1 770-709-5581
> cell:   +1 404-984-4366
> skype:  gmcharlt
> web:    http://www.esilibrary.com/
> Supporting Koha and Evergreen: http://koha-community.org &
> http://evergreen-ils.org
>
> diff --git a/Koha/OAI/Server/Repository.pm b/Koha/OAI/Server/Repository.pm
> index 374ce29..f4f30f6 100644
> --- a/Koha/OAI/Server/Repository.pm
> +++ b/Koha/OAI/Server/Repository.pm
> @@ -151,7 +151,7 @@ sub get_biblio_marcxml {
>          $with_items = $conf->{format}->{$format}->{include_items};
>      }
>      my $record = GetMarcBiblio($biblionumber, $with_items, 1);
> -    $record ? $record->as_xml() : undef;
> +    $record ? $record->as_xml_record() : undef;
>  }
>


More information about the Koha mailing list