Fix splicing the right way

This commit is contained in:
Mark Schouten 2014-06-30 15:17:08 +02:00
parent fa3681cbdb
commit 816790ce4e
2 changed files with 1 additions and 4 deletions

View file

@ -71,7 +71,7 @@ function jtable_respond($records, $method = 'multiple', $msg = 'Undefined errorm
} else {
if (isset($_GET['jtPageSize'])) {
$jTableResult['TotalRecordCount'] = count($records);
$records = array_slice($records, $_GET['jtStartIndex']*$_GET['jtPageSize'], $_GET['jtPageSize']);
$records = array_slice($records, $_GET['jtStartIndex'], $_GET['jtPageSize']);
}
$jTableResult['Result'] = "OK";
$jTableResult['Records'] = $records;