From 06c95853f5b9088e42f9f5d62eb9234eafd784e5 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Thu, 19 Dec 2024 12:01:00 +0100 Subject: [PATCH] GenericTable: drop $tableIsSortable property --- models/GenericTable.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/models/GenericTable.php b/models/GenericTable.php index a5535c7d..b63df32b 100644 --- a/models/GenericTable.php +++ b/models/GenericTable.php @@ -15,7 +15,6 @@ class GenericTable private $title; private $title_class; - private $tableIsSortable = false; public $form_above; public $form_below; @@ -37,9 +36,6 @@ class GenericTable if (!empty($options['sort_direction']) && !in_array($options['sort_direction'], ['up', 'down'])) $options['sort_direction'] = 'up'; - // Make sure we know whether we can actually sort on something. - $this->tableIsSortable = !empty($options['base_url']); - // How much data do we have? $this->recordCount = $options['get_count'](); @@ -100,7 +96,7 @@ class GenericTable if (empty($column['header'])) continue; - $isSortable = $this->tableIsSortable && !empty($column['is_sortable']); + $isSortable = !empty($column['is_sortable']); $sortDirection = $key == $this->sort_order && $this->sort_direction === 'up' ? 'down' : 'up'; $header = [