diff --git a/application/controllers/Hamsat.php b/application/controllers/Hamsat.php index be5a6978c..afcf37ee0 100644 --- a/application/controllers/Hamsat.php +++ b/application/controllers/Hamsat.php @@ -102,7 +102,7 @@ class Hamsat extends CI_Controller { } $decoded_json->data[$i]->mode_class = $modeclass; for($j = 0; $j < count($decoded_json->data[$i]->grids); $j++) { - $worked = $this->logbook_model->check_if_grid_worked_in_logbook($decoded_json->data[$i]->grids[$j], null, "SAT"); + $worked = $this->logbook_model->check_if_grid_worked_in_logbook(substr($decoded_json->data[$i]->grids[$j], 0, 4), null, "SAT"); if ($worked->num_rows() != 0) { $decoded_json->data[$i]->grids_wkd[$j] = 1; } else { diff --git a/assets/js/sections/hamsat.js b/assets/js/sections/hamsat.js index a987f41f5..014d2ea36 100644 --- a/assets/js/sections/hamsat.js +++ b/assets/js/sections/hamsat.js @@ -107,9 +107,9 @@ function loadActivationsTable(rows, show_workable_only) { grids = []; for (var j=0; j < activation.grids_wkd.length; j++) { if (activation.grids_wkd[j] == 1) { - grids.push(""+activation.grids[j]+"") + grids.push(""+activation.grids[j].substring(0, 4)+"") } else { - grids.push(""+activation.grids[j]+"") + grids.push(""+activation.grids[j].substring(0, 4)+"") } } data.push(grids.join(' '));