From f43115508cd808bfaf22d72e877632e194d70111 Mon Sep 17 00:00:00 2001
From: Andreas <6977712+AndreasK79@users.noreply.github.com>
Date: Wed, 5 Jan 2022 18:04:53 +0100
Subject: [PATCH 1/3] [WAS Map] Map scaling now works on mobile
(cherry picked from commit 2ee1a550b879c3d3384e981caa8a62c265efeb0d)
---
application/views/awards/was/map.php | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/application/views/awards/was/map.php b/application/views/awards/was/map.php
index b9267d4a7..2fe4253d0 100644
--- a/application/views/awards/was/map.php
+++ b/application/views/awards/was/map.php
@@ -146,8 +146,12 @@
-
-
+
- Red - Not Worked
From a12531fa60ac15ac88d2160a6f1cb4b1e2542a95 Mon Sep 17 00:00:00 2001
From: Hugo Silva
Date: Mon, 20 Dec 2021 19:15:22 +0000
Subject: [PATCH 2/3] Fixes error on advanced search with nested groups
(cherry picked from commit 450f710cfdeafcce468393886a58bcb4b867aa9c)
---
application/controllers/Search.php | 381 ++++++++++-------------------
1 file changed, 133 insertions(+), 248 deletions(-)
diff --git a/application/controllers/Search.php b/application/controllers/Search.php
index 33bc1cdcb..7f11437bc 100644
--- a/application/controllers/Search.php
+++ b/application/controllers/Search.php
@@ -130,257 +130,142 @@ class Search extends CI_Controller {
$this->db->update('queries', $data);
}
+ function buildWhere(array $object, string $condition = null): void
+ {
+ /*
+ * The $object is one of the following:
+ * - a group, with 'condition' and 'rules' keys
+ * - a condition, that is either 'AND' or 'OR' depending on the parent group setting
+ */
+ $objectIsGroup = isset($object['condition']);
+ if ($objectIsGroup) {
+ if ($condition === null || $condition === 'AND') {
+ $this->db->group_start();
+ } else {
+ $this->db->or_group_start();
+ }
+ foreach ($object['rules'] as $rule) {
+ /*
+ * Now iterate over the children, that are either groups or conditions
+ */
+ $this->buildWhere($rule, $object['condition']);
+ }
+ $this->db->group_end();
+ } else {
+ $object['field'] = $this->config->item('table_name') . '.' . $object['field'];
+
+ if ($object['operator'] == "equal") {
+ if ($condition == "AND") {
+ $this->db->where($object['field'], $object['value']);
+ } else {
+ $this->db->or_where($object['field'], $object['value']);
+ }
+ }
+
+ if ($object['operator'] == "not_equal") {
+ if ($condition == "AND") {
+ $this->db->where($object['field'] . ' !=', $object['value']);
+ } else {
+ $this->db->or_where($object['field'] . ' !=', $object['value']);
+ }
+ }
+
+ if ($object['operator'] == "begins_with") {
+ if ($condition == "AND") {
+ $this->db->where($object['field'] . ' like ', $object['value'] . "%");
+ } else {
+ $this->db->or_where($object['field'] . ' like ', $object['value'] . "%");
+ }
+ }
+
+ if ($object['operator'] == "contains") {
+ if ($condition == "AND") {
+ $this->db->where($object['field'] . ' like ', "%" . $object['value'] . "%");
+ } else {
+ $this->db->or_where($object['field'] . ' like ', "%" . $object['value'] . "%");
+ }
+ }
+
+ if ($object['operator'] == "ends_with") {
+ if ($condition == "AND") {
+ $this->db->where($object['field'] . ' like ', "%" . $object['value']);
+ } else {
+ $this->db->or_where($object['field'] . ' like ', "%" . $object['value']);
+ }
+ }
+
+ if ($object['operator'] == "is_empty") {
+ if ($condition == "AND") {
+ $this->db->where($object['field'], "''");
+ } else {
+ $this->db->or_where($object['field'], "''");
+ }
+ }
+
+ if ($object['operator'] == "is_not_empty") {
+ if ($condition == "AND") {
+ $this->db->where($object['field'] . ' !=', "''");
+ } else {
+ $this->db->or_where($object['field'] . ' !=', "''");
+ }
+ }
+
+ if ($object['operator'] == "is_null") {
+ if ($condition == "AND") {
+ $this->db->where($object['field'] . ' is ', NULL);
+ } else {
+ $this->db->or_where($object['field'] . ' is ', NULL);
+ }
+ }
+
+ if ($object['operator'] == "is_not_null") {
+ if ($condition == "AND") {
+ $this->db->where($object['field'] . ' is not ', NULL);
+ } else {
+ $this->db->or_where($object['field'] . ' is not ', NULL);
+ }
+ }
+
+
+ if ($object['operator'] == "less") {
+ if ($condition == "AND") {
+ $this->db->where($object['field'] . ' <', $object['value']);
+ } else {
+ $this->db->or_where($object['field'] . ' <', $object['value']);
+ }
+ }
+
+ if ($object['operator'] == "less_or_equal") {
+ if ($condition == "AND") {
+ $this->db->where($object['field'] . ' <=', $object['value']);
+ } else {
+ $this->db->or_where($object['field'] . ' <=', $object['value']);
+ }
+ }
+
+ if ($object['operator'] == "greater") {
+ if ($condition == "AND") {
+ $this->db->where($object['field'] . ' >', $object['value']);
+ } else {
+ $this->db->or_where($object['field'] . ' >', $object['value']);
+ }
+ }
+
+ if ($object['operator'] == "greater_or_equal") {
+ if ($condition == "AND") {
+ $this->db->where($object['field'] . ' >=', $object['value']);
+ } else {
+ $this->db->or_where($object['field'] . ' >=', $object['value']);
+ }
+ }
+ }
+ }
+
function fetchQueryResult($json, $returnquery) {
$search_items = json_decode($json, true);
- $search_type = "";
-
- foreach($search_items as $key=>$value){
-
-
- if($value == "AND") {
- $search_type = "AND";
- }
- if ($value == "OR") {
- $search_type = "OR";
- }
-
- if(is_array($value)) {
- foreach($value as $values)
- {
- if(isset($values['rules'])) {
- if($values['condition'] == "AND") {
- $this->db->group_start();
- } else {
- $this->db->or_group_start();
- }
- foreach($values['rules'] as $group_value)
- {
- $group_value['field'] = $this->config->item('table_name') . '.' . $group_value['field'];
-
- if($group_value['operator'] == "equal") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'], $group_value['value']);
- } else {
- $this->db->or_where($group_value['field'], $group_value['value']);
- }
- }
-
- if($group_value['operator'] == "not_equal") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' !=', $group_value['value']);
- } else {
- $this->db->or_where($group_value['field'].' !=', $group_value['value']);
- }
- }
-
- if($group_value['operator'] == "begins_with") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' like ', $group_value['value']."%");
- } else {
- $this->db->or_where($group_value['field'].' like ', $group_value['value']."%");
- }
- }
-
- if($group_value['operator'] == "contains") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' like ', "%".$group_value['value']."%");
- } else {
- $this->db->or_where($group_value['field'].' like ', "%".$group_value['value']."%");
- }
- }
-
- if($group_value['operator'] == "ends_with") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' like ', "%".$group_value['value']);
- } else {
- $this->db->or_where($group_value['field'].' like ', "%".$group_value['value']);
- }
- }
-
- if($group_value['operator'] == "is_empty") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'], "''");
- } else {
- $this->db->or_where($group_value['field'], "''");
- }
- }
-
- if($group_value['operator'] == "is_not_empty") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' !=', "''");
- } else {
- $this->db->or_where($group_value['field'].' !=', "''");
- }
- }
-
- if($group_value['operator'] == "is_null") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' is ', NULL);
- } else {
- $this->db->or_where($group_value['field'].' is ', NULL);
- }
- }
-
- if($group_value['operator'] == "is_not_null") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' is not ', NULL);
- } else {
- $this->db->or_where($group_value['field'].' is not ', NULL);
- }
- }
-
-
- if($group_value['operator'] == "less") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' <', $group_value['value']);
- } else {
- $this->db->or_where($group_value['field'].' <', $group_value['value']);
- }
- }
-
- if($group_value['operator'] == "less_or_equal") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' <=', $group_value['value']);
- } else {
- $this->db->or_where($group_value['field'].' <=', $group_value['value']);
- }
- }
-
- if($group_value['operator'] == "greater") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' >', $group_value['value']);
- } else {
- $this->db->or_where($group_value['field'].' >', $group_value['value']);
- }
- }
-
- if($group_value['operator'] == "greater_or_equal") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' >=', $group_value['value']);
- } else {
- $this->db->or_where($group_value['field'].' >=', $group_value['value']);
- }
- }
-
- }
- $this->db->group_end();
- } else {
- //print_r($values['field']);
- $values['field'] = $this->config->item('table_name') . '.' . $values['field'];
-
- if(isset($values['operator'])) {
-
- }
- if($values['operator'] == "equal") {
- if($search_type == "AND") {
- $this->db->where($values['field'], $values['value']);
- } else {
- $this->db->or_where($values['field'], $values['value']);
- }
- }
-
- if($values['operator'] == "not_equal") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' !=', $values['value']);
- } else {
- $this->db->or_where($values['field'].' !=', $values['value']);
- }
- }
-
- if($values['operator'] == "begins_with") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' like ', $values['value']."%");
- } else {
- $this->db->or_where($values['field'].' like ', $values['value']."%");
- }
- }
-
- if($values['operator'] == "contains") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' like ', "%".$values['value']."%");
- } else {
- $this->db->or_where($values['field'].' like ', "%".$values['value']."%");
- }
- }
-
- if($values['operator'] == "ends_with") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' like ', "%".$values['value']);
- } else {
- $this->db->or_where($values['field'].' like ', "%".$values['value']);
- }
- }
-
- if($values['operator'] == "is_empty") {
- if($search_type == "AND") {
- $this->db->where($values['field'], "");
- } else {
- $this->db->or_where($values['field'], "");
- }
- }
-
- if($values['operator'] == "is_not_empty") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' !=', "");
- } else {
- $this->db->or_where($values['field'].' !=', "");
- }
- }
-
- if($values['operator'] == "is_null") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' is ', NULL);
- } else {
- $this->db->or_where($values['field'].' is ', NULL);
- }
- }
-
- if($values['operator'] == "is_not_null") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' is not ', NULL);
- } else {
- $this->db->or_where($values['field'].' is not ', NULL);
- }
- }
-
- if($values['operator'] == "less") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' <', $values['value']);
- } else {
- $this->db->or_where($values['field'].' <', $values['value']);
- }
- }
-
- if($values['operator'] == "less_or_equal") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' <=', $values['value']);
- } else {
- $this->db->or_where($values['field'].' <=', $values['value']);
- }
- }
-
- if($values['operator'] == "greater") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' >', $values['value']);
- } else {
- $this->db->or_where($values['field'].' >', $values['value']);
- }
- }
-
- if($values['operator'] == "greater_or_equal") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' >=', $values['value']);
- } else {
- $this->db->or_where($values['field'].' >=', $values['value']);
- }
- }
- }
-
- }
- }
- }
+ $this->buildWhere($search_items);
$this->db->order_by('COL_TIME_ON', 'DESC');
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
@@ -392,4 +277,4 @@ class Search extends CI_Controller {
}
return $query;
}
-}
+}
\ No newline at end of file
From 91ebce55bb05ba41c894d38e7017ed6a77eac899 Mon Sep 17 00:00:00 2001
From: Peter Goodhall
Date: Tue, 4 Jan 2022 17:10:32 +0000
Subject: [PATCH 3/3] [LoTW] Add PSK Submodes for 31 and 63
Add PSK Submodes for 31 and 63 theres still a lot more to add
(cherry picked from commit 6b8960bf1755dc71d23aaa3635459447f67bba48)
---
application/controllers/Lotw.php | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php
index bc332fab9..96cb3789c 100644
--- a/application/controllers/Lotw.php
+++ b/application/controllers/Lotw.php
@@ -952,6 +952,17 @@ class Lotw extends CI_Controller {
return "DATA";
break;
}
+ case "PSK":
+ if ($submode == "PSK31") {
+ return "PSK31";
+ break;
+ } elseif ($submode == "PSK63") {
+ return "PSK63";
+ break;
+ } else {
+ return "DATA";
+ break;
+ }
default:
return $mode;
endswitch;