From dc29d69e4ee232b7cebbe091677a464202fce004 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Sat, 31 Jan 2026 20:14:30 +0100 Subject: [PATCH] stations model is already loaded at this point and Mh lib only needs to be loaded once in a session --- application/models/Logbook_model.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index cf48093fa..1932cafe2 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -5410,10 +5410,9 @@ class Logbook_model extends CI_Model { } if ($apicall && (($this->config->item('mqtt_server') ?? '') != '')) { - $this->load->model('stations'); - $this->load->library('Mh'); - $h_user=$this->stations->get_user_from_station($station_id); - $event_data=$data; + $this->load->is_loaded('Mh') ?: $this->load->library('Mh'); + $h_user = $this->stations->get_user_from_station($station_id); + $event_data = $data; $event_data['user_name']=($h_user->user_name ?? ''); $event_data['user_id']=($h_user->user_id ?? ''); $this->mh->wl_event('qso/logged/api/'.($h_user->user_id ?? ''), json_encode($event_data));