Le 07/04/2010 18:32, Galen Charlton a écrit :
> Hi,
>
> On Wed, Mar 10, 2010 at 4:25 PM, Henri-Damien LAURENT
> <[email protected]> wrote:
>> From: Paul Poulain <[email protected]>
>>
>> removing only is2709 for authorities
>
> Do you have evidence that the issue behind why that restriction exists
> in the first place has been resolved? See commit
> 57d128f72781fc854936ab0c4e8dffde167108bc.
Using grs and UNIMARC authorities with marcxml I had no problems indexing.
>
>> + if ($marc->fields()){
>> + return $marc;
>> + } else {
>> + return undef;
>> + }
>> }
>
> This is superfluous - by the time it gets to this point, it will
> contain a valid MARC::Record object. If somehow it is retrieving a
> MARC record that has no fields defined, that indicates a data problem
> that needs to be dealt with lower down in the stack.
Should we fail each time a record cannot be decoded, would it be from
XML or iso2709, it seems that GetAuthority can also return without
raising errors if it is
my $record=eval
{MARC::Record->new_from_xml(StripNonXmlChars($marcxml),'UTF-8',
(C4::Context->preference("marcflavour") eq
"UNIMARC"?"UNIMARCAUTH":C4::Context->preference("marcflavour")))};
return undef if ($@);
So GetAuthority can return non marc data.
And then fields would fail.
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches