From 88e006ef2d6e12f547fad205ae1648d57b828b55 Mon Sep 17 00:00:00 2001 From: phl0 Date: Tue, 27 Aug 2024 12:36:50 +0200 Subject: [PATCH] Prevent QRA lib being loaded over and over again (and spilling debug log) --- application/controllers/Qso.php | 15 ++++++++------- .../views/qso/components/previous_contacts.php | 1 - 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/application/controllers/Qso.php b/application/controllers/Qso.php index 0e64e53c3..5a465f8ad 100644 --- a/application/controllers/Qso.php +++ b/application/controllers/Qso.php @@ -33,7 +33,7 @@ class QSO extends CI_Controller { $data['notice'] = false; $data['stations'] = $this->stations->all_of_user(); $data['radios'] = $this->cat->radios(); - $data['radio_last_updated'] = $this->cat->last_updated()->row(); + $data['radio_last_updated'] = $this->cat->last_updated()->row(); $data['query'] = $this->logbook_model->last_custom('5'); $data['dxcc'] = $this->logbook_model->fetchDxcc(); $data['iota'] = $this->logbook_model->fetchIota(); @@ -596,14 +596,15 @@ class QSO extends CI_Controller { // Return Previous QSOs Made in the active logbook public function component_past_contacts() { - if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } - $this->load->model('logbook_model'); - session_write_close(); + $this->load->library('Qra'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); } + $this->load->model('logbook_model'); + session_write_close(); - $data['query'] = $this->logbook_model->last_custom('5'); + $data['query'] = $this->logbook_model->last_custom('5'); - // Load view - $this->load->view('qso/components/previous_contacts', $data); + // Load view + $this->load->view('qso/components/previous_contacts', $data); } public function get_eqsl_default_qslmsg() { // Get ONLY Default eQSL-Message with this function. This is ONLY for QSO relevant! diff --git a/application/views/qso/components/previous_contacts.php b/application/views/qso/components/previous_contacts.php index a6e2033c0..51f604cc0 100644 --- a/application/views/qso/components/previous_contacts.php +++ b/application/views/qso/components/previous_contacts.php @@ -62,7 +62,6 @@ function echo_table_col($row, $name) { case 'WWFF': echo '' . ($row->COL_WWFF_REF) . ''; break; case 'POTA': echo '' . ($row->COL_POTA_REF) . ''; break; case 'Grid': - $ci->load->library('qra'); echo '' . ($ci->qra->echoQrbCalcLink($row->COL_MY_GRIDSQUARE, $row->COL_VUCC_GRIDS, $row->COL_GRIDSQUARE)) . ''; break; case 'Distance': echo '' . ($row->COL_DISTANCE ? $row->COL_DISTANCE . ' km' : '') . ''; break; case 'Band': echo ''; if($row->COL_SAT_NAME != null) { echo ''.$row->COL_SAT_NAME.''; } else { echo strtolower($row->COL_BAND); } echo ''; break;