diff --git a/application/controllers/Adif.php b/application/controllers/Adif.php
index e464d9e7..5adbcbde 100644
--- a/application/controllers/Adif.php
+++ b/application/controllers/Adif.php
@@ -200,7 +200,7 @@ class adif extends CI_Controller {
break;
};
- $one_error = $this->logbook_model->import($record, $this->input->post('station_profile'), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markHrd'), true, $this->input->post('operatorName'));
+ $one_error = $this->logbook_model->import($record, $this->input->post('station_profile'), $this->input->post('skipDuplicate'), $this->input->post('markClublog'),$this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markHrd'), true, $this->input->post('operatorName'), false, $this->input->post('skipStationCheck'));
if ($one_error != '') {
$custom_errors.=$one_error."
";
}
diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php
index 7fcdbfa4..83792108 100755
--- a/application/models/Logbook_model.php
+++ b/application/models/Logbook_model.php
@@ -2872,7 +2872,7 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray =
* $markHrd - used in ADIF import to mark QSOs as exported to HRDLog.net Logbook when importing QSOs
* $skipexport - used in ADIF import to skip the realtime upload to QRZ Logbook when importing QSOs from ADIF
*/
- function import($record, $station_id = "0", $skipDuplicate = false, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markHrd = false,$skipexport = false, $operatorName = false, $apicall = false) {
+ function import($record, $station_id = "0", $skipDuplicate = false, $markClublog = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markHrd = false,$skipexport = false, $operatorName = false, $apicall = false, $skipStationCheck = false) {
// be sure that station belongs to user
$CI =& get_instance();
$CI->load->model('stations');
@@ -2887,6 +2887,10 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray =
$record['station_callsign']=$station_profile_call;
}
+ if ((!$skipStationCheck) && ($station_id != 0) && ($record['station_callsign'] != $station_profile_call)) { // Check if station_call from import matches profile ONLY when submitting via GUI.
+ return "Wrong station_callsign ".$record['station_callsign']." while importing QSO with ".$record['call']." for ".$station_profile_call." : SKIPPED";
+ }
+
$CI =& get_instance();
$CI->load->library('frequency');
$my_error = "";
diff --git a/application/views/adif/import.php b/application/views/adif/import.php
index 90b45ed4..05385346 100644
--- a/application/views/adif/import.php
+++ b/application/views/adif/import.php
@@ -108,6 +108,16 @@
+