From: Nahuel ANGELINETTI Date: Tue, 16 Feb 2010 13:34:15 +0000 (+0100) Subject: (bug #4195) fix OAI repository X-Git-Tag: v3.00.06~49 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=b27c5296b777bed4e192e004f8c4ed730092da36;hp=960de0899ec0ecdd7d1793b77f70bbe4830d08e1;p=koha.git (bug #4195) fix OAI repository this fix the OAI repository, to don't return resumptionToken if there is no more record. Signed-off-by: Henri-Damien LAURENT --- diff --git a/opac/oai.pl b/opac/oai.pl index b4176adec8..546623ec2e 100755 --- a/opac/oai.pl +++ b/opac/oai.pl @@ -11,7 +11,7 @@ use C4::Context; BEGIN { eval { require PerlIO::gzip }; - $GZIP = $@ ? 0 : 1; + $GZIP = ($@) ? 0 : 1; } unless ( C4::Context->preference('OAI-PMH') ) { @@ -291,7 +291,7 @@ sub new { metadataPrefix => $token->{metadata_prefix}, from => $token->{from}, until => $token->{until}, - offset => $pos ) ); + offset => $pos ) ) if ($pos > $token->{offset}); return $self; } @@ -338,7 +338,7 @@ sub new { metadataPrefix => $token->{metadata_prefix}, from => $token->{from}, until => $token->{until}, - offset => $pos ) ); + offset => $pos ) ) if ($pos > $token->{offset}); return $self; }