diff --git a/application/controllers/User.php b/application/controllers/User.php index c92ec6c1d..2c81f7fef 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -1155,7 +1155,7 @@ class User extends CI_Controller { $stationdata = [ 'user_id' => $this->session->userdata('user_id'), 'station_name' => $this->input->post('station_name', true), - 'station_callsign' => $this->input->post('station_callsign', true), + 'station_callsign' => trim($this->input->post('station_callsign', true)), 'station_dxcc' => $this->input->post('station_dxcc', true), 'station_cqz' => $this->input->post('station_cqz', true), 'station_ituz' => $this->input->post('station_ituz', true), diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 056b78e25..e31638d33 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -5623,7 +5623,7 @@ class Logbook_model extends CI_Model { $this->db->where_in('station_id', $station_ids); //load only for the station_callsign given - $this->db->where('COL_STATION_CALLSIGN', xss_clean($station_callsign)); + $this->db->where('COL_STATION_CALLSIGN', trim(xss_clean($station_callsign))); //load only for the given contest id $this->db->where('COL_CONTEST_ID', xss_clean($contest_id)); diff --git a/application/models/Stations.php b/application/models/Stations.php index d41d80254..f39546edb 100644 --- a/application/models/Stations.php +++ b/application/models/Stations.php @@ -134,7 +134,7 @@ class Stations extends CI_Model { 'station_pota' => xss_clean(strtoupper($this->input->post('pota', true))), 'station_sig' => xss_clean(strtoupper($this->input->post('sig', true))), 'station_sig_info' => xss_clean(strtoupper($this->input->post('sig_info', true))), - 'station_callsign' => xss_clean(strtoupper($this->input->post('station_callsign', true))), + 'station_callsign' => trim(xss_clean(strtoupper($this->input->post('station_callsign', true)))), 'station_power' => is_numeric(xss_clean($this->input->post('station_power', true))) ? xss_clean($this->input->post('station_power', true)) : NULL, 'station_dxcc' => xss_clean($this->input->post('dxcc', true)), 'station_cnty' => $county, @@ -196,7 +196,7 @@ class Stations extends CI_Model { 'station_pota' => xss_clean(strtoupper($this->input->post('pota', true))), 'station_sig' => xss_clean(strtoupper($this->input->post('sig', true))), 'station_sig_info' => xss_clean(strtoupper($this->input->post('sig_info', true))), - 'station_callsign' => xss_clean(strtoupper($this->input->post('station_callsign', true))), + 'station_callsign' => trim(xss_clean(strtoupper($this->input->post('station_callsign', true)))), 'station_power' => is_numeric(xss_clean($this->input->post('station_power', true))) ? xss_clean($this->input->post('station_power', true)) : NULL, 'station_dxcc' => xss_clean($this->input->post('dxcc', true)), 'station_cnty' => $county,