mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
Fix splicing the right way
This commit is contained in:
parent
fa3681cbdb
commit
816790ce4e
2 changed files with 1 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue