From 90cf44857c0cfe4e92d89b14cd3ec4791b7155a0 Mon Sep 17 00:00:00 2001 From: Irina Peshinskaya Date: Mon, 5 May 2014 03:36:52 +0300 Subject: [PATCH] MT#5879 Fix commited error with remove pageStart. --- lib/NGCP/Panel/Utils/Datatables.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/NGCP/Panel/Utils/Datatables.pm b/lib/NGCP/Panel/Utils/Datatables.pm index c912f134f7..276f0bc64d 100644 --- a/lib/NGCP/Panel/Utils/Datatables.pm +++ b/lib/NGCP/Panel/Utils/Datatables.pm @@ -12,9 +12,6 @@ sub process { my $use_rs_cb = ('CODE' eq (ref $rs)); my $aaData = []; - my $displayRecords = 0; - - my $totalRecords = $use_rs_cb ? 0 : $rs->count; # check if we need to join more tables # TODO: can we nest it deeper than once level? @@ -84,7 +81,8 @@ sub process { } } - $displayRecords = $use_rs_cb ? 0 : $rs->count; + my $totalRecords = $use_rs_cb ? 0 : $rs->count; + my $displayRecords = $use_rs_cb ? 0 : $rs->count; # show specific row on top (e.g. if we come back from a newly created entry) my $topId = $c_->request->params->{iIdOnTop}; @@ -126,6 +124,7 @@ sub process { } # pagination + my $pageStart = $c_->request->params->{iDisplayStart}; my $pageSize = $c_->request->params->{iDisplayLength}; if ($use_rs_cb) { ($rs, $totalRecords, $displayRecords) = $rs->(