From d519d88604bf1730a1c2e0631a6047326fa57a56 Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 27 Oct 2023 10:14:29 +0200 Subject: [PATCH] use start as end time if end is not set separately --- application/models/Logbook_model.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index c62ddf56..b5fffd1c 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -8,7 +8,11 @@ class Logbook_model extends CI_Model { $callsign = str_replace('Ø', '0', $this->input->post('callsign')); // Join date+time $datetime = date("Y-m-d",strtotime($this->input->post('start_date')))." ". $this->input->post('start_time'); - $datetime_off = date("Y-m-d",strtotime($this->input->post('start_date')))." ". $this->input->post('end_time'); + if ($this->input->post('end_time') != null) { + $datetime_off = date("Y-m-d",strtotime($this->input->post('start_date')))." ". $this->input->post('end_time'); + } else { + $datetime_off = $datetime; + } if ($this->input->post('prop_mode') != null) { $prop_mode = $this->input->post('prop_mode'); } else {