From acc6e9ab727d732ede68e4e71501fc68042929ce Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Mon, 3 Apr 2023 16:47:21 +0100 Subject: [PATCH 1/2] [API] Add QSO Fixes bug if string contains the whole ADIF header --- application/libraries/Adif_parser.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/application/libraries/Adif_parser.php b/application/libraries/Adif_parser.php index 06f6fc52..96f670ed 100644 --- a/application/libraries/Adif_parser.php +++ b/application/libraries/Adif_parser.php @@ -119,7 +119,15 @@ class ADIF_Parser public function feed($input_data) //allows the parser to be fed a string { - $this->data = $input_data; + + if (strpos($input_data, "") !== false) { + $arr=explode("",$input_data); + $newstring = $arr[1]; + $this->data = $newstring; + } else { + $this->data = $input_data; + } + $this->datasplit = preg_split("//i", mb_substr($this->data, $this->i, NULL, "UTF-8")); } From 5497de3334546bd58c8f1fd8b4255fcd23241d84 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Wed, 5 Apr 2023 14:52:05 +0200 Subject: [PATCH 2/2] [Contesting] Fix serial not saved when using space --- assets/js/sections/contesting.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/assets/js/sections/contesting.js b/assets/js/sections/contesting.js index 3974a7c6..e22c9e01 100644 --- a/assets/js/sections/contesting.js +++ b/assets/js/sections/contesting.js @@ -87,6 +87,15 @@ $(function () { }); }); +// We don't want spaces to be written in serial +$(function () { + $('#exch_serial_r').on('keypress', function (e) { + if (e.which == 32) { + return false; + } + }); +}); + // Here we capture keystrokes to execute functions document.onkeyup = function (e) { // ALT-W wipe