diff --git a/src/opnsense/mvc/app/library/OPNsense/Base/UIModelGrid.php b/src/opnsense/mvc/app/library/OPNsense/Base/UIModelGrid.php index 47f054a15..81a153bb0 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Base/UIModelGrid.php +++ b/src/opnsense/mvc/app/library/OPNsense/Base/UIModelGrid.php @@ -102,9 +102,10 @@ class UIModelGrid } // if result is relevant, count total and add (max number of) items to result. + // $itemsPerPage = -1 is used as wildcard for "all results" if ($searchFound) { - if (count($result['rows']) < $itemsPerPage && - $recordIndex >= ($itemsPerPage*($currentPage-1)) + if ((count($result['rows']) < $itemsPerPage && + $recordIndex >= ($itemsPerPage*($currentPage-1)) || $itemsPerPage == -1) ) { $result['rows'][] = $row; }