From 8cd5c690d68404164cb1ffdb16ced0a806916f40 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 5 Mar 2020 15:48:50 +0100 Subject: [PATCH] Fix nasty bug with deleted vs. includedeleted --- application/controllers/Awards.php | 6 +++--- application/models/Dxcc.php | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index 7c59467f..ff6a5117 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -99,7 +99,7 @@ class Awards extends CI_Controller { $postdata['worked'] = $this->input->post('worked'); $postdata['confirmed'] = $this->input->post('confirmed'); $postdata['notworked'] = $this->input->post('notworked'); - $postdata['deleted'] = $this->input->post('deleted'); + $postdata['includedeleted'] = $this->input->post('includedeleted'); $postdata['Africa'] = $this->input->post('Africa'); $postdata['Asia'] = $this->input->post('Asia'); $postdata['Europe'] = $this->input->post('Europe'); @@ -115,7 +115,7 @@ class Awards extends CI_Controller { $postdata['worked'] = 1; $postdata['confirmed'] = 1; $postdata['notworked'] = 1; - $postdata['deleted'] = 1; + $postdata['includedeleted'] = 1; $postdata['Africa'] = 1; $postdata['Asia'] = 1; $postdata['Europe'] = 1; @@ -259,4 +259,4 @@ class Awards extends CI_Controller { $this->load->view('interface_assets/footer'); } -} \ No newline at end of file +} diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php index 90b3d3d6..b845c574 100644 --- a/application/models/Dxcc.php +++ b/application/models/Dxcc.php @@ -250,7 +250,7 @@ class DXCC extends CI_Model { $sql .= " group by col_dxcc ) x on dxcc_entities.adif = x.col_dxcc"; - if ($postdata['deleted'] == NULL) { + if ($postdata['includedeleted'] == NULL) { $sql .= " and dxcc_entities.end is null"; } @@ -278,7 +278,7 @@ class DXCC extends CI_Model { $sql .= " group by col_dxcc ) x on dxcc_entities.adif = x.col_dxcc";; - if ($postdata['deleted'] == NULL) { + if ($postdata['includedeleted'] == NULL) { $sql .= " and dxcc_entities.end is null"; } @@ -314,7 +314,7 @@ class DXCC extends CI_Model { $sql .= " where 1 = 1"; - if ($postdata['deleted'] == NULL) { + if ($postdata['includedeleted'] == NULL) { $sql .= " and end is null"; } @@ -362,7 +362,7 @@ class DXCC extends CI_Model { ) ll on dxcc_entities.adif = ll.col_dxcc where 1=1"; - if ($postdata['deleted'] == 'false') { + if ($postdata['includedeleted'] == 'false') { $sql .= " and dxcc_entities.end is null"; } @@ -396,7 +396,7 @@ class DXCC extends CI_Model { ) ll on dxcc_entities.adif = ll.col_dxcc where 1=1"; - if ($postdata['deleted'] == 'false') { + if ($postdata['includedeleted'] == 'false') { $sql .= " and dxcc_entities.end is null"; }