Merge pull request #2095 from phl0/fixEmptyStationPower

Make sure we only store numbers for station power
这个提交包含在:
Andreas Kristiansen 2023-04-28 14:10:51 +02:00 提交者 GitHub
当前提交 2a9ab4b0ab
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23
共有 2 个文件被更改,包括 3 次插入3 次删除

查看文件

@ -75,7 +75,7 @@ class Stations extends CI_Model {
'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($this->input->post('station_callsign', true)),
'station_power' => xss_clean($this->input->post('station_power', 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' => xss_clean($this->input->post('station_cnty', true)),
'station_cq' => xss_clean($this->input->post('station_cq', true)),
@ -108,7 +108,7 @@ class Stations extends CI_Model {
'station_sig' => xss_clean($this->input->post('sig', true)),
'station_sig_info' => xss_clean($this->input->post('sig_info', true)),
'station_callsign' => xss_clean($this->input->post('station_callsign', true)),
'station_power' => xss_clean($this->input->post('station_power', 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' => xss_clean($this->input->post('station_cnty', true)),
'station_cq' => xss_clean($this->input->post('station_cq', true)),

查看文件

@ -42,7 +42,7 @@
<div class="form-group">
<label for="stationPowerInput">Station Power</label>
<input type="number" class="form-control" name="station_power" id="stationPowerInput" step="1" aria-describedby="stationPowerInputHelp" placeholder="10" required>
<input type="number" class="form-control" name="station_power" id="stationPowerInput" step="1" aria-describedby="stationPowerInputHelp" placeholder="10">
<small id="stationPowerInputHelp" class="form-text text-muted">Default station power. Overwritten by CAT.</small>
</div>