From e57289eeb6408a73bf05c292a606995e694962fd Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Thu, 19 Dec 2024 11:56:00 +0100 Subject: [PATCH] GenericTable: drop support for get_count_params, get_data_params --- models/GenericTable.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/models/GenericTable.php b/models/GenericTable.php index 415ef53..a5535c7 100644 --- a/models/GenericTable.php +++ b/models/GenericTable.php @@ -41,7 +41,7 @@ class GenericTable $this->tableIsSortable = !empty($options['base_url']); // How much data do we have? - $this->recordCount = $options['get_count'](...(!empty($options['get_count_params']) ? $options['get_count_params'] : [])); + $this->recordCount = $options['get_count'](); // How much data do we need to retrieve? $this->items_per_page = !empty($options['items_per_page']) ? $options['items_per_page'] : 30; @@ -58,8 +58,6 @@ class GenericTable // Gather parameters for the data gather function first. $parameters = [$this->start, $this->items_per_page, $options['sort_order'], $options['sort_direction']]; - if (!empty($options['get_data_params']) && is_array($options['get_data_params'])) - $parameters = array_merge($parameters, $options['get_data_params']); // Okay, let's fetch the data! $data = $options['get_data'](...$parameters);