diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index 775e2c09..aa478446 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -104,8 +104,8 @@ class Lotw extends CI_Controller { // Get credentials for LoTW $query = $this->user_model->get_by_id($this->session->userdata('user_id')); - $q = $query->row(); - $data['user_lotw_name'] = $q->user_lotw_name; + $q = $query->row(); + $data['user_lotw_name'] = $q->user_lotw_name; $data['user_lotw_password'] = $q->user_lotw_password; // Get URL for downloading LoTW @@ -121,7 +121,7 @@ class Lotw extends CI_Controller { } // Query the logbook to determine when the last LoTW confirmation was - $lotw_last_qsl_date = $this->logbook_model->lotw_last_qsl_date(); + $lotw_last_qsl_date = date('Y-m-d', strtotime($this->logbook_model->lotw_last_qsl_date())); // Build URL for LoTW report file $lotw_url .= "?"; @@ -132,8 +132,8 @@ class Lotw extends CI_Controller { //TODO: Option to specifiy whether we download location data from LoTW or not //$lotw_url .= "&qso_qsldetail=\"yes\"; - $lotw_url .= "&qso_qslsince="; - $lotw_url .= "$lotw_last_qsl_date"; + $lotw_url .= "&qso_qslsince="; + $lotw_url .= "$lotw_last_qsl_date"; // Only pull back entries that belong to this callsign $lotw_call = $this->session->userdata('user_callsign');