mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
path and copy adjustments
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -8,8 +8,7 @@
|
|||||||
/uploads/*.tq8
|
/uploads/*.tq8
|
||||||
/uploads/*.TQ8
|
/uploads/*.TQ8
|
||||||
/install/*
|
/install/*
|
||||||
/updates/*.xml
|
/updates/*
|
||||||
/updates/*.html
|
|
||||||
/images/eqsl_card_images/*.jpg
|
/images/eqsl_card_images/*.jpg
|
||||||
/updates/clublog_scp.txt
|
/updates/clublog_scp.txt
|
||||||
/assets/qslcard/*
|
/assets/qslcard/*
|
||||||
|
|||||||
@@ -97,6 +97,13 @@ class Lookup extends CI_Controller {
|
|||||||
$arCalls[] = str_replace('0', 'Ø', $value);
|
$arCalls[] = str_replace('0', 'Ø', $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$src = 'assets/ressources/clublog_scp.txt';
|
||||||
|
if (copy($src, $file)) {
|
||||||
|
$this->scp();
|
||||||
|
} else {
|
||||||
|
log_message('error', 'Failed to copy source file ('.$src.') to new location. Check if this path has the right permission: '.$file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sort($arCalls);
|
sort($arCalls);
|
||||||
|
|||||||
@@ -455,7 +455,7 @@ class QSO extends CI_Controller {
|
|||||||
$query = isset($_GET['query']) ? $_GET['query'] : FALSE;
|
$query = isset($_GET['query']) ? $_GET['query'] : FALSE;
|
||||||
$wwff = strtoupper($query);
|
$wwff = strtoupper($query);
|
||||||
|
|
||||||
$file = 'assets/json/wwff.txt';
|
$file = 'updates/wwff.txt';
|
||||||
|
|
||||||
if (is_readable($file)) {
|
if (is_readable($file)) {
|
||||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||||
@@ -470,6 +470,13 @@ class QSO extends CI_Controller {
|
|||||||
$json[] = ["name"=>$value];
|
$json[] = ["name"=>$value];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$src = 'assets/ressources/wwff.txt';
|
||||||
|
if (copy($src, $file)) {
|
||||||
|
$this->get_wwff();
|
||||||
|
} else {
|
||||||
|
log_message('error', 'Failed to copy source file ('.$src.') to new location. Check if this path has the right permission: '.$file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -484,7 +491,7 @@ class QSO extends CI_Controller {
|
|||||||
$query = isset($_GET['query']) ? $_GET['query'] : FALSE;
|
$query = isset($_GET['query']) ? $_GET['query'] : FALSE;
|
||||||
$pota = strtoupper($query);
|
$pota = strtoupper($query);
|
||||||
|
|
||||||
$file = 'assets/json/pota.txt';
|
$file = 'updates/pota.txt';
|
||||||
|
|
||||||
if (is_readable($file)) {
|
if (is_readable($file)) {
|
||||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||||
@@ -499,6 +506,13 @@ class QSO extends CI_Controller {
|
|||||||
$json[] = ["name"=>$value];
|
$json[] = ["name"=>$value];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$src = 'assets/ressources/pota.txt';
|
||||||
|
if (copy($src, $file)) {
|
||||||
|
$this->get_pota();
|
||||||
|
} else {
|
||||||
|
log_message('error', 'Failed to copy source file ('.$src.') to new location. Check if this path has the right permission: '.$file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -516,7 +530,7 @@ class QSO extends CI_Controller {
|
|||||||
$query = isset($_GET['query']) ? $_GET['query'] : FALSE;
|
$query = isset($_GET['query']) ? $_GET['query'] : FALSE;
|
||||||
$dok = strtoupper($query);
|
$dok = strtoupper($query);
|
||||||
|
|
||||||
$file = 'assets/json/dok.txt';
|
$file = 'updates/dok.txt';
|
||||||
|
|
||||||
if (is_readable($file)) {
|
if (is_readable($file)) {
|
||||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||||
@@ -531,6 +545,13 @@ class QSO extends CI_Controller {
|
|||||||
$json[] = ["name"=>$value];
|
$json[] = ["name"=>$value];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$src = 'assets/ressources/dok.txt';
|
||||||
|
if (copy($src, $file)) {
|
||||||
|
$this->get_dok();
|
||||||
|
} else {
|
||||||
|
log_message('error', 'Failed to copy source file ('.$src.') to new location. Check if this path has the right permission: '.$file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class Pota
|
|||||||
$json = [];
|
$json = [];
|
||||||
$ref = strtoupper($query);
|
$ref = strtoupper($query);
|
||||||
|
|
||||||
$file = 'assets/json/pota.txt';
|
$file = 'updates/pota.txt';
|
||||||
|
|
||||||
if (is_readable($file)) {
|
if (is_readable($file)) {
|
||||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||||
@@ -29,6 +29,13 @@ class Pota
|
|||||||
$json[] = ["name" => $value];
|
$json[] = ["name" => $value];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$src = 'assets/ressources/pota.txt';
|
||||||
|
if (copy($src, $file)) {
|
||||||
|
$this->get($query);
|
||||||
|
} else {
|
||||||
|
log_message('error', 'Failed to copy source file ('.$src.') to new location. Check if this path has the right permission: '.$file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $json;
|
return $json;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class Sota
|
|||||||
$json = [];
|
$json = [];
|
||||||
$ref = strtoupper($query);
|
$ref = strtoupper($query);
|
||||||
|
|
||||||
$file = 'assets/json/sota.txt';
|
$file = 'updates/sota.txt';
|
||||||
|
|
||||||
if (is_readable($file)) {
|
if (is_readable($file)) {
|
||||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||||
@@ -29,6 +29,13 @@ class Sota
|
|||||||
$json[] = ["name" => $value];
|
$json[] = ["name" => $value];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$src = 'assets/ressources/sota.txt';
|
||||||
|
if (copy($src, $file)) {
|
||||||
|
$this->get($query);
|
||||||
|
} else {
|
||||||
|
log_message('error', 'Failed to copy source file ('.$src.') to new location. Check if this path has the right permission: '.$file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $json;
|
return $json;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class Wwff
|
|||||||
$json = [];
|
$json = [];
|
||||||
$ref = strtoupper($query);
|
$ref = strtoupper($query);
|
||||||
|
|
||||||
$file = 'assets/json/wwff.txt';
|
$file = 'updates/wwff.txt';
|
||||||
|
|
||||||
if (is_readable($file)) {
|
if (is_readable($file)) {
|
||||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||||
@@ -29,6 +29,13 @@ class Wwff
|
|||||||
$json[] = ["name" => $value];
|
$json[] = ["name" => $value];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$src = 'assets/ressources/wwff.txt';
|
||||||
|
if (copy($src, $file)) {
|
||||||
|
$this->get($query);
|
||||||
|
} else {
|
||||||
|
log_message('error', 'Failed to copy source file ('.$src.') to new location. Check if this path has the right permission: '.$file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $json;
|
return $json;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class Update_model extends CI_Model {
|
|||||||
if ($contents === FALSE) {
|
if ($contents === FALSE) {
|
||||||
return "Something went wrong with fetching the DOK file.";
|
return "Something went wrong with fetching the DOK file.";
|
||||||
} else {
|
} else {
|
||||||
$file = './assets/json/dok.txt';
|
$file = './updates/dok.txt';
|
||||||
|
|
||||||
if (file_put_contents($file, $contents) !== FALSE) { // Save our content to the file.
|
if (file_put_contents($file, $contents) !== FALSE) { // Save our content to the file.
|
||||||
$nCount = count(file($file));
|
$nCount = count(file($file));
|
||||||
@@ -69,7 +69,7 @@ class Update_model extends CI_Model {
|
|||||||
|
|
||||||
$csvfile = 'https://www.sotadata.org.uk/summitslist.csv';
|
$csvfile = 'https://www.sotadata.org.uk/summitslist.csv';
|
||||||
|
|
||||||
$sotafile = './assets/json/sota.txt';
|
$sotafile = './updates/sota.txt';
|
||||||
|
|
||||||
$csvhandle = fopen($csvfile, "r");
|
$csvhandle = fopen($csvfile, "r");
|
||||||
if ($csvhandle === FALSE) {
|
if ($csvhandle === FALSE) {
|
||||||
@@ -110,7 +110,7 @@ class Update_model extends CI_Model {
|
|||||||
|
|
||||||
$csvfile = 'https://wwff.co/wwff-data/wwff_directory.csv';
|
$csvfile = 'https://wwff.co/wwff-data/wwff_directory.csv';
|
||||||
|
|
||||||
$wwfffile = './assets/json/wwff.txt';
|
$wwfffile = './updates/wwff.txt';
|
||||||
|
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, $csvfile);
|
curl_setopt($ch, CURLOPT_URL, $csvfile);
|
||||||
@@ -155,7 +155,7 @@ class Update_model extends CI_Model {
|
|||||||
|
|
||||||
$csvfile = 'https://pota.app/all_parks.csv';
|
$csvfile = 'https://pota.app/all_parks.csv';
|
||||||
|
|
||||||
$potafile = './assets/json/pota.txt';
|
$potafile = './updates/pota.txt';
|
||||||
|
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, $csvfile);
|
curl_setopt($ch, CURLOPT_URL, $csvfile);
|
||||||
|
|||||||
Reference in New Issue
Block a user