From 2787480cf402ec67c089d40c46a16c1a84bb98c2 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 7 Apr 2014 17:05:48 -0400 Subject: [PATCH] web staff: add offset to patron search api Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm | 4 ++-- .../src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm index 0ba9a7515e..f19af8c214 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm @@ -1340,7 +1340,7 @@ __PACKAGE__->register_method( sub patron_adv_search { my( $self, $client, $auth, $search_hash, $search_limit, - $search_sort, $include_inactive, $search_ou, $flesh_fields) = @_; + $search_sort, $include_inactive, $search_ou, $flesh_fields, $offset) = @_; my $e = new_editor(authtoken=>$auth); return $e->event unless $e->checkauth; @@ -1366,7 +1366,7 @@ sub patron_adv_search { my $ids = $U->storagereq( "open-ils.storage.actor.user.crazy_search", $search_hash, $search_limit, $search_sort, $include_inactive, - $e->requestor->ws_ou, $search_ou, $opt_boundary); + $e->requestor->ws_ou, $search_ou, $opt_boundary, $offset); return $ids unless $self->api_name =~ /fleshed/; diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm index 06117ff682..f55da8c998 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm @@ -642,6 +642,7 @@ sub patron_search { my $ws_ou = shift; my $search_org = shift || $ws_ou; my $opt_boundary = shift || 0; + my $offset = shift || 0; my $penalty_sort = 0; @@ -796,6 +797,7 @@ sub patron_search { GROUP BY $group_list ORDER BY $order_by LIMIT $limit + OFFSET $offset SQL return actor::user->db_Main->selectcol_arrayref($select, {Columns=>[scalar(@$sort)]}, map {lc($_)} (@usrv,@phonev,@identv,@namev,@addrv)); -- 2.11.0