Merge pull request #232 from g0wfv/PreventLotwPullError

LoTW: Prevent error auto pull after initial pull
This commit is contained in:
Peter Goodhall 2018-12-14 23:35:20 +00:00 committed by GitHub
commit 2687d061d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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');