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