From f5ea29493fc9c17e52ff94f7814ec98417303b59 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Fri, 27 Dec 2024 20:59:35 -0500 Subject: [PATCH] QA: When you push the clear button, clear the hidden columns * This is a bit of a workaround for the moment. --- lib/html_utility.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/html_utility.php b/lib/html_utility.php index f7f112f1fa..90fdb68d3a 100644 --- a/lib/html_utility.php +++ b/lib/html_utility.php @@ -419,6 +419,12 @@ function form_process_visible_display_text($table_id, $display_text) { $tableColumns[$table_id] = json_decode(read_user_setting("visible_columns_{$table_id}{$tableCount[$table_id]}"), true); } + if (isset_request_var('clear') || isset_request_var('reset')) { + db_execute_prepared('DELETE FROM settings_user + WHERE user_id = ? AND name = ?', + array($_SESSION[SESS_USER_ID], "visible_columns_{$table_id}{$tableCount[$table_id]}")); + } + if (isset_request_var('columns_add')) { $columns = get_nfilter_request_var('columns_add');