From 27fb96b303d6c73399c5fb322294cbba8286602e Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Sun, 17 Dec 2023 11:03:55 +0100 Subject: [PATCH] ci loader and fix for ok status if no qso to upload --- application/controllers/Qrz.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/application/controllers/Qrz.php b/application/controllers/Qrz.php index efc8449ed..9ecfb72b6 100644 --- a/application/controllers/Qrz.php +++ b/application/controllers/Qrz.php @@ -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;