ci loader and fix for ok status if no qso to upload

pull/2852/head
HB9HIL 2023-12-17 11:03:55 +01:00
rodzic 6d7df1a2d3
commit 27fb96b303
1 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -58,12 +58,11 @@ class Qrz extends CI_Controller {
$data['qsos'] = $this->logbook_model->get_qrz_qsos($station_id, $trusted);
$errormessages=array();
$CI =& get_instance();
$CI->load->library('AdifHelper');
$this->load->library('AdifHelper');
if ($data['qsos']) {
foreach ($data['qsos']->result() as $qso) {
$adif = $CI->adifhelper->getAdifLine($qso);
$adif = $this->adifhelper->getAdifLine($qso);
if ($qso->COL_QRZCOM_QSO_UPLOAD_STATUS == 'M') {
$result = $this->logbook_model->push_qso_to_qrz($qrz_api_key, $adif, true);
@ -89,6 +88,9 @@ class Qrz extends CI_Controller {
$result['status'] = 'Error';
}
}
if ($i == 0) {
$result['status']='OK';
}
$result['count'] = $i;
$result['errormessages'] = $errormessages;
return $result;