Merge pull request #867 from phl0/AddSDOKinfo

Add SDOK info
pull/875/head
Peter Goodhall 2021-02-08 17:10:30 +00:00 zatwierdzone przez GitHub
commit 33a89cb37a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 5 dodań i 22 usunięć

17
.gitignore vendored
Wyświetl plik

@ -1,17 +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/*
.idea/*
.DS_Store
sync.sh
*.p12

Wyświetl plik

@ -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 = [];

Wyświetl plik

@ -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";
}

Wyświetl plik

@ -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',