From 3eae1c71dbe6f2bde57ab19f7e95ccb4bfb2ee54 Mon Sep 17 00:00:00 2001 From: int2001 Date: Sun, 22 Feb 2026 09:02:23 +0000 Subject: [PATCH] Add option to disable Map at QSO-Window --- application/controllers/Qso.php | 7 +++++++ application/controllers/User.php | 13 +++++++++++++ application/models/User_model.php | 5 ++++- application/views/qso/index.php | 2 +- application/views/user/edit.php | 8 ++++++++ 5 files changed, 33 insertions(+), 2 deletions(-) diff --git a/application/controllers/Qso.php b/application/controllers/Qso.php index 8da599501..b38b62057 100644 --- a/application/controllers/Qso.php +++ b/application/controllers/Qso.php @@ -99,6 +99,13 @@ class QSO extends CI_Controller { $data['user_station_to_qso_tab'] = 0; } + $qkey_opt = $this->user_options_model->get_options('qso_tab', array('option_name' => 'map', 'option_key' => 'show'))->result(); + if (count($qkey_opt) > 0) { + $data['user_qso_show_map'] = $qkey_opt[0]->option_value; + } else { + $data['user_qso_show_map'] = 1; // default: show map + } + // Get status of DX Waterfall enable option $qkey_opt=$this->user_options_model->get_options('dxwaterfall',array('option_name'=>'enable','option_key'=>'boolean'))->result(); if (count($qkey_opt)>0) { diff --git a/application/controllers/User.php b/application/controllers/User.php index 34069fe54..08d50e09b 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -239,6 +239,7 @@ class User extends CI_Controller { $data['user_sig_to_qso_tab'] = $this->input->post('user_sig_to_qso_tab'); $data['user_dok_to_qso_tab'] = $this->input->post('user_dok_to_qso_tab'); $data['user_station_to_qso_tab'] = $this->input->post('user_station_to_qso_tab'); + $data['user_qso_show_map'] = $this->input->post('user_qso_show_map') ?? 1; $data['user_language'] = $this->input->post('user_language'); $data['global_oqrs_text'] = $this->input->post('global_oqrs_text') ?? ''; $data['oqrs_grouped_search'] = $this->input->post('oqrs_grouped_search') ?? 'off'; @@ -313,6 +314,7 @@ class User extends CI_Controller { $this->input->post('oqrs_auto_matching') ?? 'on', $this->input->post('oqrs_direct_auto_matching') ?? 'on', $this->input->post('user_dxwaterfall_enable') ?? 'N', + $this->input->post('user_qso_show_map') ?? 1, $this->input->post('clubstation') == '1' ? true : false) ) { // Check for errors @@ -822,6 +824,17 @@ class User extends CI_Controller { } } + if ($this->input->post('user_qso_show_map') !== false) { + $data['user_qso_show_map'] = $this->input->post('user_qso_show_map', false); + } else { + $qkey_opt = $this->user_options_model->get_options('qso_tab', array('option_name' => 'map', 'option_key' => 'show'), $this->uri->segment(3))->result(); + if (count($qkey_opt) > 0) { + $data['user_qso_show_map'] = $qkey_opt[0]->option_value; + } else { + $data['user_qso_show_map'] = 1; // default: show + } + } + if($this->input->post('global_oqrs_text')) { $data['global_oqrs_text'] = $this->input->post('global_oqrs_text', false); } else { diff --git a/application/models/User_model.php b/application/models/User_model.php index f13eff6a4..3fc0e422b 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -225,7 +225,7 @@ class User_Model extends CI_Model { $user_lotw_name, $user_lotw_password, $user_eqsl_name, $user_eqsl_password, $user_clublog_name, $user_clublog_password, $user_winkey, $on_air_widget_enabled, $on_air_widget_display_last_seen, $on_air_widget_show_only_most_recent_radio, $qso_widget_display_qso_time, $dashboard_banner, $dashboard_solar, $global_oqrs_text, $oqrs_grouped_search, - $oqrs_grouped_search_show_station_name, $oqrs_auto_matching, $oqrs_direct_auto_matching,$user_dxwaterfall_enable, $clubstation = 0) { + $oqrs_grouped_search_show_station_name, $oqrs_auto_matching, $oqrs_direct_auto_matching,$user_dxwaterfall_enable, $user_qso_show_map, $clubstation = 0) { // Check that the user isn't already used if(!$this->exists($username)) { $data = array( @@ -317,6 +317,7 @@ class User_Model extends CI_Model { $this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $insert_id . ", 'widget','qso','display_qso_time','".(xss_clean($qso_widget_display_qso_time ?? 'false'))."');"); $this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $insert_id . ", 'qso_db_search_priority','enable','boolean','".(xss_clean($user_qso_db_search_priority ?? 'Y'))."');"); $this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $insert_id . ", 'dxwaterfall','enable','boolean','".xss_clean($user_dxwaterfall_enable ?? 'N')."');"); + $this->db->query("insert into user_options (user_id, option_type, option_name, option_key, option_value) values (?, 'qso_tab', 'map', 'show', ?)", [$insert_id, (int)(xss_clean($user_qso_show_map ?? 1))]); return OK; } else { return EUSERNAMEEXISTS; @@ -382,6 +383,8 @@ class User_Model extends CI_Model { $this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'qso_tab','sig','show',".(xss_clean($fields['user_sig_to_qso_tab'] ?? 'off') == "on" ? 1 : 0).");"); $this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'qso_tab','dok','show',".(xss_clean($fields['user_dok_to_qso_tab'] ?? 'off') == "on" ? 1 : 0).");"); $this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'qso_tab','station','show',".(xss_clean($fields['user_station_to_qso_tab'] ?? 'off') == "on" ? 1 : 0).");"); + $this->db->query("replace INTO user_options (user_id, option_type, option_name, option_key, option_value) VALUES (?, 'qso_tab', 'map', 'show', ?)", [$fields['id'], (int)(xss_clean($fields['user_qso_show_map'] ?? 1))] + ); $this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'widget','on_air','enabled','".(xss_clean($fields['on_air_widget_enabled'] ?? 'false'))."');"); $this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'widget','on_air','display_last_seen','".(xss_clean($fields['on_air_widget_display_last_seen'] ?? 'false'))."');"); $this->db->query("replace into user_options (user_id, option_type, option_name, option_key, option_value) values (" . $fields['id'] . ", 'widget','on_air','display_only_most_recent_radio','".(xss_clean($fields['on_air_widget_show_only_most_recent_radio'] ?? 'true'))."');"); diff --git a/application/views/qso/index.php b/application/views/qso/index.php index 44f8cc332..d97b3c104 100644 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -820,7 +820,7 @@ if (typeof window.DX_WATERFALL_FIELD_MAP === 'undefined') {
-
+ diff --git a/application/views/user/edit.php b/application/views/user/edit.php index 311824e3b..72920d168 100644 --- a/application/views/user/edit.php +++ b/application/views/user/edit.php @@ -688,6 +688,14 @@
+
+ + + +