diff --git a/includes/misc.inc.php b/includes/misc.inc.php index 6c6cbde..d1a7542 100644 --- a/includes/misc.inc.php +++ b/includes/misc.inc.php @@ -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; diff --git a/zones.php b/zones.php index 592419e..3b7850c 100644 --- a/zones.php +++ b/zones.php @@ -194,9 +194,6 @@ if ($action == "list" or $action== "listslaves") { } } usort($return, "zonesort"); - if (isset($_GET['jtStartIndex']) and isset($_GET['jtPageSize'])) { - jtable_respond(array_slice($return, $_GET['jtStartIndex'], $_GET['jtPageSize'])); - } jtable_respond($return); } elseif ($action == "create") { if (_valid_label($_POST['name']) === FALSE) {