From 906892a2eab7780fed5bcf3fc9e115403d7a8d7a Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Wed, 3 Jan 2018 22:32:09 -0700 Subject: [PATCH] Close #3 --- lib/getpunchtable.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/getpunchtable.php b/lib/getpunchtable.php index 35b3cbd..13e133b 100644 --- a/lib/getpunchtable.php +++ b/lib/getpunchtable.php @@ -30,7 +30,12 @@ $out = []; $out['draw'] = intval($VARS['draw']); -$out['recordsTotal'] = $database->count('punches', ['uid' => $managed_uids]); +if ($managed_uids === false) { + $out['recordsTotal'] = $database->count('punches'); +} else { + $out['recordsTotal'] = $database->count('punches', ['uid' => $managed_uids]); +} + $filter = false; // sort