Skip to content

Commit

Permalink
deprecated stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
HB9HIL committed Jul 11, 2024
1 parent 927e648 commit 99508d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 198,885 deletions.
38 changes: 5 additions & 33 deletions application/controllers/Lotw.php
Original file line number Diff line number Diff line change
Expand Up @@ -947,41 +947,13 @@ public function export() {
}

/*
Load the ARRL LoTW User Activity CSV and saves into uploads/lotw_users.csv
Deprecated. To be back compatible we do the same as update/lotw_users
HB9HIL, July 2024
*/
public function load_users() {
$contents = file_get_contents('https://lotw.arrl.org/lotw-user-activity.csv', true);

if($contents === FALSE) {
echo "Something went wrong with fetching the LoTW users file.";
} else {
$file = './updates/lotw_users.csv';

if (file_put_contents($file, $contents) !== FALSE) { // Save our content to the file.
echo "LoTW User Data Saved.";
} else {
echo "FAILED: Could not write to LoTW users file";
}
}
}

/*
Check if callsign is an active LoTW user and return whether its true or not
*/
function lotw_usercheck($callsign) {
$f = fopen('./updates/lotw_users.csv', "r");
$result = false;
while ($row = fgetcsv($f)) {
if ($row[0] == strtoupper($callsign)) {
$result = $row[0];
echo "Found";
break;
} else {
echo "Not Found";
break;
}
}
fclose($f);
$this->load->model('Update_model');
$result = $this->Update_model->lotw_users();
echo $result;
}

function signlog($sign_key, $string) {
Expand Down
15 changes: 1 addition & 14 deletions application/controllers/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,20 +308,7 @@ public function update_clublog_scp() {
}

public function download_lotw_users() {
$contents = file_get_contents('https://lotw.arrl.org/lotw-user-activity.csv', true);

if($contents === FALSE) {
echo "Something went wrong with fetching the LoTW users file.";
} else {
$file = './updates/lotw_users.csv';

if (file_put_contents($file, $contents) !== FALSE) { // Save our content to the file.
echo "LoTW User Data Saved.";
} else {
echo "FAILED: Could not write to LoTW users file";
}
}

$this->lotw_users();
}

public function lotw_users() {
Expand Down
Loading

0 comments on commit 99508d8

Please sign in to comment.