Lines 35-41
sub new {
Link Here
|
35 |
my $sets = GetOAISets; |
35 |
my $sets = GetOAISets; |
36 |
my $pos = 0; |
36 |
my $pos = 0; |
37 |
foreach my $set (@$sets) { |
37 |
foreach my $set (@$sets) { |
38 |
if ($pos < $token->{offset}) { |
38 |
if ($pos < $token->{next_id}) { |
39 |
$pos++; |
39 |
$pos++; |
40 |
next; |
40 |
next; |
41 |
} |
41 |
} |
Lines 50-64
sub new {
Link Here
|
50 |
) |
50 |
) |
51 |
); |
51 |
); |
52 |
$pos++; |
52 |
$pos++; |
53 |
last if ($pos + 1 - $token->{offset}) > $repository->{koha_max_count}; |
53 |
last if ($pos + 1 - $token->{next_id}) > $repository->{koha_max_count}; |
54 |
} |
54 |
} |
55 |
|
55 |
|
56 |
$self->resumptionToken( |
56 |
$self->resumptionToken( |
57 |
Koha::OAI::Server::ResumptionToken->new( |
57 |
Koha::OAI::Server::ResumptionToken->new( |
58 |
metadataPrefix => $token->{metadata_prefix}, |
58 |
metadataPrefix => $token->{metadata_prefix}, |
59 |
offset => $pos |
59 |
cursor => $pos, |
|
|
60 |
next_id => $pos |
60 |
) |
61 |
) |
61 |
) if ( $pos > $token->{offset} ); |
62 |
) if ( $pos < scalar @$sets ); |
62 |
|
63 |
|
63 |
return $self; |
64 |
return $self; |
64 |
} |
65 |
} |
65 |
- |
|
|