diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index d39a1d2c..a347e88c 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -2840,14 +2840,16 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray = if (isset($row)) { $station_gridsquare = $row->station_gridsquare; } - $this->load->library('Qra'); + if(!$this->load->is_loaded('Qra')) { + $this->load->library('Qra'); + } if ($qsl_gridsquare != "") { $data['COL_GRIDSQUARE'] = $qsl_gridsquare; $data['COL_DISTANCE'] = $this->qra->distance($station_gridsquare, $qsl_gridsquare, 'K'); } elseif ($qsl_vucc_grids != "") { $data['COL_VUCC_GRIDS'] = $qsl_vucc_grids; $data['COL_DISTANCE'] = $this->qra->distance($station_gridsquare, $qsl_vucc_grids, 'K'); - } + } $this->db->where('date_format(COL_TIME_ON, \'%Y-%m-%d %H:%i\') = "'.$datetime.'"'); $this->db->where('COL_CALL', $callsign);