From 17dff29c20e4d9ec09a085eceeda537e4b4e327e Mon Sep 17 00:00:00 2001 From: Warren Volz Date: Wed, 13 Dec 2017 00:13:01 +0000 Subject: [PATCH 1/2] update lotw url - p1k changed to lotw --- application/views/lotw/import.php | 2 +- install/assets/install.sql | 2 +- sql/tables/config.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/views/lotw/import.php b/application/views/lotw/import.php index 2e346124..226ad861 100644 --- a/application/views/lotw/import.php +++ b/application/views/lotw/import.php @@ -7,7 +7,7 @@ Upload a file -

Upload the Exported ADIF file from LoTW from the Download Report Area, to mark QSOs as confirmed on LOTW.

+

Upload the Exported ADIF file from LoTW from the Download Report Area, to mark QSOs as confirmed on LOTW.

Important Log files must have the file type .adi

diff --git a/install/assets/install.sql b/install/assets/install.sql index f827cdea..a749012f 100755 --- a/install/assets/install.sql +++ b/install/assets/install.sql @@ -3805,6 +3805,6 @@ CREATE TABLE IF NOT EXISTS `config` ( -- INSERT INTO `config` (`id`, `lotw_download_url`, `lotw_upload_url`, `lotw_rcvd_mark`, `lotw_login_url`, `eqsl_download_url`, `eqsl_rcvd_mark`) VALUES -(1, 'https://p1k.arrl.org/lotwuser/lotwreport.adi', 'https://p1k.arrl.org/lotwuser/upload', 'Y', 'https://p1k.arrl.org/lotwuser/default', 'http://www.eqsl.cc/qslcard/DownloadInBox.cfm', 'Y'); +(1, 'https://lotw.arrl.org/lotwuser/lotwreport.adi', 'https://lotw.arrl.org/lotwuser/upload', 'Y', 'https://lotw.arrl.org/lotwuser/default', 'http://www.eqsl.cc/qslcard/DownloadInBox.cfm', 'Y'); ALTER TABLE `cat` ADD `downlink_freq` INT(11) NOT NULL AFTER `mode`, ADD `uplink_freq` INT(11) NOT NULL AFTER `downlink_freq`, ADD `downlink_mode` VARCHAR(255) NOT NULL AFTER `uplink_freq`, ADD `uplink_mode` VARCHAR(255) NOT NULL AFTER `downlink_mode`, ADD `sat_name` VARCHAR(255) NOT NULL AFTER `uplink_mode`; diff --git a/sql/tables/config.sql b/sql/tables/config.sql index db6e105f..63150a8a 100644 --- a/sql/tables/config.sql +++ b/sql/tables/config.sql @@ -42,7 +42,7 @@ CREATE TABLE IF NOT EXISTS `config` ( -- INSERT INTO `config` (`id`, `lotw_download_url`, `lotw_upload_url`, `lotw_rcvd_mark`, `lotw_login_url`, `eqsl_download_url`, `eqsl_rcvd_mark`) VALUES -(1, 'https://p1k.arrl.org/lotwuser/lotwreport.adi', 'https://p1k.arrl.org/lotwuser/upload', 'Y', 'https://p1k.arrl.org/lotwuser/default', 'http://www.eqsl.cc/qslcard/DownloadInBox.cfm', 'Y'); +(1, 'https://lotw.arrl.org/lotwuser/lotwreport.adi', 'https://lotw.arrl.org/lotwuser/upload', 'Y', 'https://lotw.arrl.org/lotwuser/default', 'http://www.eqsl.cc/qslcard/DownloadInBox.cfm', 'Y'); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; From 2d4b015a440b6244ac64edde0b7cb3c586f1d5fb Mon Sep 17 00:00:00 2001 From: Warren Volz Date: Wed, 13 Dec 2017 00:55:49 +0000 Subject: [PATCH 2/2] urlencode lotw password and last qsl date in requests to lotw - fixes 404 errors due to un-encoded password or dates --- application/controllers/lotw.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/lotw.php b/application/controllers/lotw.php index 775e2c09..f98584da 100644 --- a/application/controllers/lotw.php +++ b/application/controllers/lotw.php @@ -126,14 +126,14 @@ class Lotw extends CI_Controller { // Build URL for LoTW report file $lotw_url .= "?"; $lotw_url .= "login=" . $data['user_lotw_name']; - $lotw_url .= "&password=" . $data['user_lotw_password']; + $lotw_url .= "&password=" . urlencode($data['user_lotw_password']); $lotw_url .= "&qso_query=1&qso_qsl='yes'"; //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 .= urlencode("$lotw_last_qsl_date"); // Only pull back entries that belong to this callsign $lotw_call = $this->session->userdata('user_callsign');