stations model is already loaded at this point and Mh lib only needs to be loaded once in a session

This commit is contained in:
HB9HIL
2026-01-31 20:14:30 +01:00
parent 8ee1537c96
commit dc29d69e4e

View File

@@ -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));