Merge pull request #2414 from int2001/station_profile_update_fix

Fix: Also update STATION_CALLSIGN when updating location
这个提交包含在:
Peter Goodhall 2023-08-17 10:31:02 +01:00 提交者 GitHub
当前提交 cdf2b854c9
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23

查看文件

@ -901,9 +901,12 @@ class Logbook_model extends CI_Model {
$CI =& get_instance(); $CI =& get_instance();
$CI->load->model('stations'); $CI->load->model('stations');
if (!$CI->stations->check_station_is_accessible($stationId)) { if (!$CI->stations->check_station_is_accessible($stationId)) {
return; return;
} }
$station_profile=$CI->stations->profile_clean($stationId);
$stationCallsign=$station_profile->station_callsign;
$mode = $this->get_main_mode_if_submode($this->input->post('mode')); $mode = $this->get_main_mode_if_submode($this->input->post('mode'));
if ($mode == null) { if ($mode == null) {
$mode = $this->input->post('mode'); $mode = $this->input->post('mode');
@ -930,7 +933,7 @@ class Logbook_model extends CI_Model {
$srx_string = null; $srx_string = null;
} }
if (stristr($this->input->post('usa_county'), ',')) { if (stristr($this->input->post('usa_county') ?? '', ',')) {
$uscounty = $this->input->post('usa_county'); $uscounty = $this->input->post('usa_county');
} else { } else {
$uscounty = $this->input->post('usa_state') .",".$this->input->post('usa_county'); $uscounty = $this->input->post('usa_state') .",".$this->input->post('usa_county');
@ -1076,6 +1079,7 @@ class Logbook_model extends CI_Model {
'COL_CONTEST_ID' => $this->input->post('contest_name'), 'COL_CONTEST_ID' => $this->input->post('contest_name'),
'COL_QSL_VIA' => $this->input->post('qsl_via_callsign'), 'COL_QSL_VIA' => $this->input->post('qsl_via_callsign'),
'station_id' => $stationId, 'station_id' => $stationId,
'COL_STATION_CALLSIGN' => $stationCallsign,
'COL_OPERATOR' => $this->input->post('operator_callsign'), 'COL_OPERATOR' => $this->input->post('operator_callsign'),
'COL_STATE' =>$this->input->post('usa_state'), 'COL_STATE' =>$this->input->post('usa_state'),
'COL_CNTY' => $uscounty 'COL_CNTY' => $uscounty