kopia lustrzana https://github.com/magicbug/Cloudlog
[API][QSO] Skips check_station_is_accessible() if import is coming from API
Skips check_station_is_accessible() if import is coming from API this is because api qso import doesn't have a session thus automatically fails. Extra checks must be done on the api calls to make sure things are safe. Fixes #1381 Co-Authored-By: Florian (DF2ET) <github@florian-wolters.de>pull/1383/head
rodzic
ab22d21b37
commit
96d7a2537d
|
@ -450,9 +450,9 @@ class API extends CI_Controller {
|
|||
|
||||
|
||||
if(isset($obj['station_profile_id'])) {
|
||||
$this->logbook_model->import($record, $obj['station_profile_id'], NULL, NULL, NULL, NULL, false, false);
|
||||
$this->logbook_model->import($record, $obj['station_profile_id'], NULL, NULL, NULL, NULL, false, false, true);
|
||||
} else {
|
||||
$this->logbook_model->import($record, 0, NULL, NULL, NULL, NULL, false, false);
|
||||
$this->logbook_model->import($record, 0, NULL, NULL, NULL, NULL, false, false, true);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -1879,11 +1879,11 @@ class Logbook_model extends CI_Model {
|
|||
* $markQrz - used in ADIF import to mark QSOs as exported to QRZ 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, $markLotw = false, $dxccAdif = false, $markQrz = false, $skipexport = false, $operatorName = false) {
|
||||
function import($record, $station_id = "0", $skipDuplicate = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $skipexport = false, $operatorName = false, $apicall = false) {
|
||||
// be sure that station belongs to user
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('Stations');
|
||||
if (!$CI->Stations->check_station_is_accessible($station_id)) {
|
||||
if (!$CI->Stations->check_station_is_accessible($station_id) && $apicall == false ) {
|
||||
return 'Station not accessible<br>';
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue