[#195] Fix CGI params parsing rows limit when "All" selected

This commit is contained in:
Oliver Gorwits
2015-01-25 15:18:35 +00:00
parent 85ab6e15ec
commit 67aebae2d3
3 changed files with 2 additions and 4 deletions

View File

@@ -16,6 +16,7 @@
* [#174] LDAP users should not be able to change password
* [#182] SSID and PoE showing in wrong Device Port columns
* [#181] AP Client Count report was broken
* [#195] Fix CGI params parsing rows limit when "All" selected
2.030000 - 2015-01-08

View File

@@ -171,7 +171,7 @@ sub _with_datatables_paging {
$attrs->{'offset'} = $offset;
$rs = $rs->search( {}, $attrs );
$rs = $rs->limit($limit);
$rs = $rs->limit($limit) if ($limit and $limit > 0);
return $rs;
}

View File

@@ -22,11 +22,8 @@ get '/ajax/content/report/devicepoestatus/data' => require_role admin => sub {
my $rs = schema('netdisco')->resultset('Virtual::DevicePoeStatus');
my $exp_params = expand_hash( scalar params );
my $recordsTotal = $rs->count;
my @data = $rs->get_datatables_data($exp_params)->hri->all;
my $recordsFiltered = $rs->get_datatables_filtered_count($exp_params);
content_type 'application/json';