Fix some issues in LoTW controller

pull/2752/head
phl0 2023-11-30 12:26:31 +01:00
rodzic 227ded2165
commit a8be9179c3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
1 zmienionych plików z 6 dodań i 8 usunięć

Wyświetl plik

@ -631,6 +631,12 @@ class Lotw extends CI_Controller {
if ($query->num_rows() >= 1) {
$result = '';
// Get URL for downloading LoTW
$url_query = $this->db->query('SELECT lotw_download_url FROM config');
$q = $url_query->row();
$lotw_url = $q->lotw_download_url;
foreach ($query->result() as $user) {
if ( ($sync_user_id != null) && ($sync_user_id != $user->user_id) ) { continue; }
@ -652,11 +658,6 @@ class Lotw extends CI_Controller {
$data['user_lotw_name'] = urlencode($user->user_lotw_name);
$data['user_lotw_password'] = urlencode($user->user_lotw_password);
// Get URL for downloading LoTW
$query = $query = $this->db->query('SELECT lotw_download_url FROM config');
$q = $query->row();
$lotw_url = $q->lotw_download_url;
$lotw_last_qsl_date = date('Y-m-d', strtotime($this->logbook_model->lotw_last_qsl_date($user->user_id)));
// Build URL for LoTW report file
@ -681,9 +682,6 @@ class Lotw extends CI_Controller {
ini_set('memory_limit', '-1');
$result = $this->loadFromFile($file, false);
}
if ($result == '') {
$result = "You have not defined your ARRL LoTW credentials!";
}
return $result;
} else {
return "No LoTW User details found to carry out matches.";