From d6acdce80db5bdf027fd187f42b4e4181d61840e Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 20 Jun 2019 15:16:53 +0100 Subject: [PATCH] Possibly fixes the last of the clublog errors --- application/controllers/Clublog.php | 9 ++++++--- application/models/Clublog_model.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/application/controllers/Clublog.php b/application/controllers/Clublog.php index e3b4a734..c18998eb 100644 --- a/application/controllers/Clublog.php +++ b/application/controllers/Clublog.php @@ -80,9 +80,10 @@ class Clublog extends CI_Controller { $info = curl_getinfo($request); if(curl_errno($request)) { - echo 'Curl error: '.curl_error($request); + $catch_error = curl_error($request); } - curl_close ($request); + curl_close ($request); + // If Clublog Accepts mark the QSOs if (preg_match('/\baccepted\b/', $response)) { @@ -90,8 +91,10 @@ class Clublog extends CI_Controller { echo "QSOs uploaded and Logbook QSOs marked as sent to Clublog"; } else { - echo "some other issue"; + echo $catch_error; + } + } } else { echo "Nothing awaiting upload to clublog"; diff --git a/application/models/Clublog_model.php b/application/models/Clublog_model.php index 23b3bf25..ad65bf36 100644 --- a/application/models/Clublog_model.php +++ b/application/models/Clublog_model.php @@ -20,7 +20,7 @@ class Clublog_model extends CI_Model { 'COL_CLUBLOG_QSO_UPLOAD_STATUS' => "Y", ); - $this->db->where("COL_CLUBLOG_QSO_UPLOAD_STATUS", ""); + $this->db->where("COL_CLUBLOG_QSO_UPLOAD_STATUS", null); $this->db->or_where("COL_CLUBLOG_QSO_UPLOAD_STATUS", "N"); $this->db->update($this->config->item('table_name'), $data); }