From c3f8b7be721164ad299e5bbcbdf80c577b1d3385 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Fri, 3 May 2024 16:00:51 +0100 Subject: [PATCH] [Visitor] Fixed issue where grid map wasnt functional --- application/controllers/Visitor.php | 10 +++++----- application/models/Gridmap_model.php | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/application/controllers/Visitor.php b/application/controllers/Visitor.php index 54bffd67..496ac3e0 100644 --- a/application/controllers/Visitor.php +++ b/application/controllers/Visitor.php @@ -248,7 +248,7 @@ class Visitor extends CI_Controller { // Get Confirmed LoTW & Paper Squares (non VUCC) - $query = $this->gridmap_model->get_band_confirmed('SAT', 'All', 'false', 'true', 'false', 'All', $logbooks_locations_array); + $query = $this->gridmap_model->get_band_confirmed('SAT', 'All', 'true', 'true', 'false', 'false', 'All', $logbooks_locations_array); if ($query && $query->num_rows() > 0) @@ -284,7 +284,7 @@ class Visitor extends CI_Controller { } // Get worked squares - $query = $this->gridmap_model->get_band('SAT', 'All', 'false', 'true', 'false', 'All', $logbooks_locations_array); + $query = $this->gridmap_model->get_band('SAT', 'All', 'false', 'true', 'false', 'false', 'All', $logbooks_locations_array); if ($query && $query->num_rows() > 0) { @@ -318,7 +318,7 @@ class Visitor extends CI_Controller { } } - $query_vucc = $this->gridmap_model->get_band_worked_vucc_squares('SAT', 'All', 'false', 'true', 'false', 'All', $logbooks_locations_array); + $query_vucc = $this->gridmap_model->get_band_worked_vucc_squares('SAT', 'All', 'false', 'true', 'false', 'false', 'All', $logbooks_locations_array); if ($query && $query_vucc->num_rows() > 0) { @@ -341,11 +341,11 @@ class Visitor extends CI_Controller { array_push($array_grid_4char, $grid_four); } } - } + } } // Confirmed Squares - $query_vucc = $this->gridmap_model->get_band_confirmed_vucc_squares('SAT', 'All', 'false', 'true', 'false', 'All', $logbooks_locations_array); + $query_vucc = $this->gridmap_model->get_band_confirmed_vucc_squares('SAT', 'All', 'true', 'true', 'false', 'false', 'All', $logbooks_locations_array); if ($query && $query_vucc->num_rows() > 0) { diff --git a/application/models/Gridmap_model.php b/application/models/Gridmap_model.php index 56047f3b..6581b37a 100644 --- a/application/models/Gridmap_model.php +++ b/application/models/Gridmap_model.php @@ -3,6 +3,7 @@ class Gridmap_model extends CI_Model { function get_band_confirmed($band, $mode, $qsl, $lotw, $eqsl, $qrz, $sat, $logbooks_locations_array = NULL) { + if ($logbooks_locations_array == NULL) { $CI =& get_instance(); $CI->load->model('logbooks_model');