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

(-)a/Koha/OAI/Server/ListSets.pm (-5 / +5 lines)
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->{cursor}) {
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->{cursor}) > $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 + 1
60
        )
61
        )
61
    ) if ( $pos > $token->{offset} );
62
    ) if ( $pos < scalar @$sets );
62
63
63
    return $self;
64
    return $self;
64
}
65
}
65
- 

Return to bug 28741