dont upload if no qsos are present
这个提交包含在:
父节点
c419c9a326
当前提交
5d645b0844
共有 1 个文件被更改,包括 8 次插入 和 2 次删除
|
|
@ -180,6 +180,7 @@ class Lotw extends CI_Controller {
|
||||||
$data['station_profile'] = $station_profile;
|
$data['station_profile'] = $station_profile;
|
||||||
$data['lotw_cert_info'] = $this->LotwCert->lotw_cert_details($station_profile->station_callsign);
|
$data['lotw_cert_info'] = $this->LotwCert->lotw_cert_details($station_profile->station_callsign);
|
||||||
|
|
||||||
|
// If Station Profile has no LOTW Cert continue on.
|
||||||
if(!isset($data['lotw_cert_info']->cert_dxcc)) {
|
if(!isset($data['lotw_cert_info']->cert_dxcc)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -193,6 +194,11 @@ class Lotw extends CI_Controller {
|
||||||
|
|
||||||
$data['qsos'] = $this->Logbook_model->get_lotw_qsos_to_upload($data['station_profile']->station_id, $data['lotw_cert_info']->date_created, $data['lotw_cert_info']->date_expires);
|
$data['qsos'] = $this->Logbook_model->get_lotw_qsos_to_upload($data['station_profile']->station_id, $data['lotw_cert_info']->date_created, $data['lotw_cert_info']->date_expires);
|
||||||
|
|
||||||
|
// Nothing to upload
|
||||||
|
if(empty($data['qsos']->result())){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($data['qsos']->result() as $temp_qso) {
|
foreach ($data['qsos']->result() as $temp_qso) {
|
||||||
array_push($qso_id_array, $temp_qso->COL_PRIMARY_KEY);
|
array_push($qso_id_array, $temp_qso->COL_PRIMARY_KEY);
|
||||||
}
|
}
|
||||||
|
|
@ -267,11 +273,11 @@ class Lotw extends CI_Controller {
|
||||||
|
|
||||||
if ($pos === false) {
|
if ($pos === false) {
|
||||||
// Upload of TQ8 Failed for unknown reason
|
// Upload of TQ8 Failed for unknown reason
|
||||||
echo "Upload Failed";
|
echo "Upload Failed"."<br>";
|
||||||
} else {
|
} else {
|
||||||
// Upload of TQ8 was successfull
|
// Upload of TQ8 was successfull
|
||||||
|
|
||||||
echo "Upload Successful - ".$filename_for_saving;
|
echo "Upload Successful - ".$filename_for_saving."<br>";
|
||||||
|
|
||||||
$this->LotwCert->last_upload($data['lotw_cert_info']->lotw_cert_id);
|
$this->LotwCert->last_upload($data['lotw_cert_info']->lotw_cert_id);
|
||||||
|
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用