From: nperez Date: Tue, 9 Feb 2010 05:41:16 +0000 (-0600) Subject: Since page is now calculated from offset and rows, just check for page again when... X-Git-Tag: 2.001002~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-DBIC-API.git;a=commitdiff_plain;h=df8f312140b52107da652cab7907e26bc7a1b0da;hp=fa2501f0e73eb2e57f012f53b43d8a567e9e1c41 Since page is now calculated from offset and rows, just check for page again when prepping total --- diff --git a/lib/Catalyst/Controller/DBIC/API.pm b/lib/Catalyst/Controller/DBIC/API.pm index 89aca62..8d343d0 100644 --- a/lib/Catalyst/Controller/DBIC/API.pm +++ b/lib/Catalyst/Controller/DBIC/API.pm @@ -369,12 +369,7 @@ sub list_perform_search $req->_set_current_result_set($rs); $req->_set_search_total_entries($req->current_result_set->pager->total_entries) - if $req->has_search_attributes && - ( - (exists($req->search_attributes->{page}) && defined($req->search_attributes->{page}) && length($req->search_attributes->{page})) - ||(exists($req->search_attributes->{offset}) && defined($req->search_attributes->{offset}) && length($req->search_attributes->{offset})) - ||(exists($req->search_attributes->{rows}) && defined($req->search_attributes->{rows}) && length($req->search_attributes->{rows})) - ); + if $req->has_search_attributes && (exists($req->search_attributes->{page}) && defined($req->search_attributes->{page}) && length($req->search_attributes->{page})); } catch {