From 5597927c641b820b559c6b607b59a091ec1e66c3 Mon Sep 17 00:00:00 2001 From: phl0 Date: Wed, 3 Feb 2021 12:28:58 +0100 Subject: [PATCH 1/3] Also provide SDOK info for logging German DOKs --- .gitignore | 1 + application/controllers/Update.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d8f4eb30d..bc2d170ad 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ /images/eqsl_card_images/*.jpg /updates/clublog_scp.txt /assets/qslcard/* +/assets/json/* .idea/* .DS_Store sync.sh diff --git a/application/controllers/Update.php b/application/controllers/Update.php index 2c640c940..fca57ffc3 100644 --- a/application/controllers/Update.php +++ b/application/controllers/Update.php @@ -293,7 +293,7 @@ class Update extends CI_Controller { * Used for autoupdating the DOK file which is used in the QSO entry dialog for autocompletion. */ public function update_dok() { - $contents = file_get_contents('https://www.df2et.de/cqrlog/dok.txt', true); + $contents = file_get_contents('https://www.df2et.de/cqrlog/dok_and_sdok.txt', true); if($contents === FALSE) { echo "Something went wrong with fetching the DOK file."; @@ -307,7 +307,7 @@ class Update extends CI_Controller { $nCount = count(file($file)); if ($nCount > 0) { - echo "DONE: " . number_format($nCount) . " DOK's saved"; + echo "DONE: " . number_format($nCount) . " DOKs and SDOKs saved"; } else { echo"FAILED: Empty file"; } From a4a9217e37685b522812d34b86cc9be1f84c6e25 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 4 Feb 2021 16:46:11 +0100 Subject: [PATCH 2/3] Minor changes (variable naming and comments) --- application/controllers/Qso.php | 4 ++-- application/views/interface_assets/footer.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/controllers/Qso.php b/application/controllers/Qso.php index f1e7b1b0d..9bf03a7a7 100755 --- a/application/controllers/Qso.php +++ b/application/controllers/Qso.php @@ -294,13 +294,13 @@ class QSO extends CI_Controller { if(!empty($this->input->get("query"))) { $query = isset($_GET['query']) ? $_GET['query'] : FALSE; - $sota = strtoupper($query); + $dok = strtoupper($query); $file = 'assets/json/dok.txt'; if (is_readable($file)) { $lines = file($file, FILE_IGNORE_NEW_LINES); - $input = preg_quote($sota, '~'); + $input = preg_quote($dok, '~'); $reg = '~^'. $input .'(.*)$~'; $result = preg_grep($reg, $lines); $json = []; diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 1e5388d9a..376c2800b 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -404,7 +404,7 @@ $( document ).ready(function() { options: [], create: false, load: function(query, callback) { - if (!query) return callback(); // Only trigger if 3 or more characters are entered + if (!query) return callback(); // Only trigger if at least 1 character is entered $.ajax({ url: baseURL+'index.php/qso/get_dok', type: 'GET', From 8143cfeb1f9169b0f3a2b8017d2db87a6d63fb50 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Mon, 8 Feb 2021 17:09:21 +0000 Subject: [PATCH 3/3] Delete .gitignore Currently not all files are automatically downloaded so this will cause lots of issues adding json file to ignore list --- .gitignore | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index bc2d170ad..000000000 --- a/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -/application/config/database.php -/application/config/config.php -/application/logs/*.php -/uploads/*.adi -/uploads/*.ADI -/uploads/*.tq8 -/uploads/*.TQ8 -/install/* -/updates/*.xml -/updates/*.html -/images/eqsl_card_images/*.jpg -/updates/clublog_scp.txt -/assets/qslcard/* -/assets/json/* -.idea/* -.DS_Store -sync.sh -*.p12