From 6e29c0385eb0fd406868cc33403bf7b0cf0b71ab Mon Sep 17 00:00:00 2001 From: phl0 Date: Mon, 8 Sep 2025 12:41:58 +0200 Subject: [PATCH] Handle disabled qrz upload settings (correctly) --- application/controllers/Qrz.php | 4 +++- assets/js/sections/qrzlogbook.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/application/controllers/Qrz.php b/application/controllers/Qrz.php index 7652723f9..87dd8c54e 100644 --- a/application/controllers/Qrz.php +++ b/application/controllers/Qrz.php @@ -249,7 +249,9 @@ class Qrz extends CI_Controller { echo json_encode($data); } } else { - $data['status']='QRZ Disabled for station'.$this->security->xss_clean($postData['station_id']); + $profile = $this->stations->profile($this->security->xss_clean($postData['station_id']))->row()->station_profile_name; + $data['status']='Error'; + $data['info']='QRZ upload disabled for station profile:'.' '.$profile; echo json_encode($data); } } else { diff --git a/assets/js/sections/qrzlogbook.js b/assets/js/sections/qrzlogbook.js index c7563046d..4a5bf6a04 100644 --- a/assets/js/sections/qrzlogbook.js +++ b/assets/js/sections/qrzlogbook.js @@ -27,7 +27,7 @@ function ExportQrz(station_id) { $(".card-body").append(''); } - if (data.errormessages.length > 0) { + if (data.hasOwnProperty("errormessages") && data.errormessages.length > 0) { $("#qrz_export").append( '
\n' + '
\n' +