Merge pull request #922 from HB9HIL/debug

This commit is contained in:
HB9HIL
2024-09-11 18:20:51 +02:00
committed by GitHub
11 changed files with 48 additions and 16 deletions

View File

@@ -214,7 +214,9 @@ class adif extends CI_Controller {
}
if (!($stopnow)) {
$this->load->library('adif_parser');
if (!$this->load->is_loaded('adif_parser')) {
$this->load->library('adif_parser');
}
$this->adif_parser->load_from_file('./uploads/'.$p_adif);
unlink('./uploads/'.$p_adif);
@@ -293,7 +295,9 @@ class adif extends CI_Controller {
$this->load->model('logbook_model');
$this->load->library('adif_parser');
if (!$this->load->is_loaded('adif_parser')) {
$this->load->library('adif_parser');
}
$this->adif_parser->load_from_file('./uploads/'.$data['upload_data']['file_name']);

View File

@@ -200,7 +200,9 @@ class API extends CI_Controller {
$this->load->model('logbook_model');
// Load ADIF Parser
$this->load->library('adif_parser');
if (!$this->load->is_loaded('adif_parser')) {
$this->load->library('adif_parser');
}
// Feed in the ADIF string
$this->adif_parser->feed($obj['string']);

View File

@@ -479,7 +479,9 @@ class Lotw extends CI_Controller {
ini_set('memory_limit', '-1');
set_time_limit(0);
$this->load->library('adif_parser');
if (!$this->load->is_loaded('adif_parser')) {
$this->load->library('adif_parser');
}
$this->adif_parser->load_from_file($filepath);

View File

@@ -113,7 +113,9 @@ class Qrz extends CI_Controller {
$data['qsos'] = $this->logbook_model->get_qrz_qsos($station_id, $trusted);
$errormessages=array();
$this->load->library('AdifHelper');
if (!$this->load->is_loaded('AdifHelper')) {
$this->load->library('AdifHelper');
}
if ($data['qsos']) {
foreach ($data['qsos']->result() as $qso) {
@@ -368,7 +370,9 @@ class Qrz extends CI_Controller {
ini_set('memory_limit', '-1');
set_time_limit(0);
$this->load->library('adif_parser');
if (!$this->load->is_loaded('adif_parser')) {
$this->load->library('adif_parser');
}
$this->adif_parser->load_from_file($filepath);

View File

@@ -51,7 +51,9 @@ class Webadif extends CI_Controller {
$data['qsos'] = $this->logbook_model->get_webadif_qsos($station_id, null, null, $trusted);
$errormessages=array();
$this->load->library('AdifHelper');
if (!$this->load->is_loaded('AdifHelper')) {
$this->load->library('AdifHelper');
}
if ($data['qsos']) {
foreach ($data['qsos']->result() as $qso) {

View File

@@ -26,7 +26,9 @@ class Clublog_model extends CI_Model
error_reporting(E_ALL);
$this->load->helper('file');
$this->load->library('AdifHelper');
if (!$this->load->is_loaded('AdifHelper')) {
$this->load->library('AdifHelper');
}
$station_profiles = $this->all_with_count($clean_userid);

View File

@@ -51,7 +51,9 @@ class Hrdlog_model extends CI_Model {
$data['qsos'] = $this->logbook_model->get_hrdlog_qsos($station_id);
$errormessages = array();
$this->load->library('AdifHelper');
if (!$this->load->is_loaded('AdifHelper')) {
$this->load->library('AdifHelper');
}
if ($data['qsos']) {
foreach ($data['qsos']->result() as $qso) {

View File

@@ -738,7 +738,9 @@ class Logbook_model extends CI_Model {
$result = $this->exists_clublog_credentials($data['station_id']);
if (isset($result->ucp) && isset($result->ucn) && (($result->ucp ?? '') != '') && (($result->ucn ?? '') != '') && ($result->clublogrealtime == 1)) {
$this->load->library('AdifHelper');
if (!$this->load->is_loaded('AdifHelper')) {
$this->load->library('AdifHelper');
}
$qso = $this->get_qso($last_id,true)->result();
$adif = $this->adifhelper->getAdifLine($qso[0]);
@@ -752,7 +754,9 @@ class Logbook_model extends CI_Model {
$result = $this->exists_hrdlog_credentials($data['station_id']);
// Push qso to hrdlog if code is set, and realtime upload is enabled, and we're not importing an adif-file
if (isset($result->hrdlog_code) && isset($result->hrdlog_username) && $result->hrdlogrealtime == 1) {
$this->load->library('AdifHelper');
if (!$this->load->is_loaded('AdifHelper')) {
$this->load->library('AdifHelper');
}
$qso = $this->get_qso($last_id,true)->result();
$adif = $this->adifhelper->getAdifLine($qso[0]);
@@ -765,7 +769,9 @@ class Logbook_model extends CI_Model {
$result = $this->exists_qrz_api_key($data['station_id']);
// Push qso to qrz if apikey is set, and realtime upload is enabled, and we're not importing an adif-file
if (isset($result->qrzapikey) && $result->qrzrealtime == 1) {
$this->load->library('AdifHelper');
if (!$this->load->is_loaded('AdifHelper')) {
$this->load->library('AdifHelper');
}
$qso = $this->get_qso($last_id,true)->result();
$adif = $this->adifhelper->getAdifLine($qso[0]);
@@ -778,7 +784,9 @@ class Logbook_model extends CI_Model {
$result = $this->exists_webadif_api_key($data['station_id']);
// Push qso to webadif if apikey is set, and realtime upload is enabled, and we're not importing an adif-file
if (isset($result->webadifapikey) && $result->webadifrealtime == 1) {
$this->load->library('AdifHelper');
if (!$this->load->is_loaded('AdifHelper')) {
$this->load->library('AdifHelper');
}
$qso = $this->get_qso($last_id,true)->result();
$adif = $this->adifhelper->getAdifLine($qso[0]);

View File

@@ -14,7 +14,9 @@ Wavelog ADIF export
<?php
$CI =& get_instance();
$CI->load->library('AdifHelper');
if (!$CI->load->is_loaded('AdifHelper')) {
$CI->load->library('AdifHelper');
}
foreach ($qsos->result() as $qso) {
echo $CI->adifhelper->getAdifLine($qso);

View File

@@ -10,7 +10,9 @@ Wavelog ADIF export
<?php
$CI =& get_instance();
$CI->load->library('AdifHelper');
if (!$CI->load->is_loaded('AdifHelper')) {
$CI->load->library('AdifHelper');
}
foreach ($qsos->result() as $qso) {
echo $CI->adifhelper->getAdifLine($qso);

View File

@@ -6,7 +6,9 @@ Wavelog ADIF export
<?php
$CI =& get_instance();
$CI->load->library('AdifHelper');
if (!$CI->load->is_loaded('AdifHelper')) {
$CI->load->library('AdifHelper');
}
foreach ($qsos->result() as $qso) {
echo $CI->adifhelper->getAdifLine($qso);