From fdb1f4c7a8378211825b04b08ffffc661248c040 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Sat, 7 Sep 2024 19:15:57 +0200 Subject: [PATCH] make sure browser uses the most recent version of contesting.js --- application/controllers/Contesting.php | 21 ++++++++++++++++--- application/views/interface_assets/footer.php | 1 - 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/application/controllers/Contesting.php b/application/controllers/Contesting.php index 3a30990a1..501d8aacf 100644 --- a/application/controllers/Contesting.php +++ b/application/controllers/Contesting.php @@ -38,6 +38,11 @@ class Contesting extends CI_Controller { $data['contestnames'] = $this->contesting_model->getActivecontests(); $data['bands'] = $this->bands->get_user_bands_for_qso_entry(); + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/sections/contesting.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/contesting.js")), + ]; + $this->load->library('form_validation'); $this->form_validation->set_rules('start_date', 'Date', 'required'); @@ -48,7 +53,7 @@ class Contesting extends CI_Controller { $this->load->view('interface_assets/header', $data); $this->load->view('contesting/index'); - $this->load->view('interface_assets/footer'); + $this->load->view('interface_assets/footer', $footerData); } public function getSessionQsos() { @@ -109,11 +114,16 @@ class Contesting extends CI_Controller { $data['contests'] = $this->Contesting_model->getAllContests(); + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/sections/contesting.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/contesting.js")), + ]; + // Render Page $data['page_title'] = __("Contests"); $this->load->view('interface_assets/header', $data); $this->load->view('contesting/add'); - $this->load->view('interface_assets/footer'); + $this->load->view('interface_assets/footer', $footerData); } public function edit($id) { @@ -126,6 +136,11 @@ class Contesting extends CI_Controller { $data['page_title'] = __("Update Contest"); + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/sections/contesting.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/contesting.js")), + ]; + $this->form_validation->set_rules('name', 'Contest Name', 'required'); $this->form_validation->set_rules('adifname', 'Adif Contest Name', 'required'); @@ -133,7 +148,7 @@ class Contesting extends CI_Controller { { $this->load->view('interface_assets/header', $data); $this->load->view('contesting/edit'); - $this->load->view('interface_assets/footer'); + $this->load->view('interface_assets/footer', $footerData); } else { diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index a13de10c7..fa56065b7 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -2472,7 +2472,6 @@ function viewEqsl(picture, callsign) { - uri->segment(2) == "counties" || $this->uri->segment(2) == "counties_details") { ?>