From c5f62ee1218ff7bbeb4ad48b7258bf09356ddb09 Mon Sep 17 00:00:00 2001 From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com> Date: Sun, 29 Dec 2024 16:38:25 +0100 Subject: [PATCH] [QSO Streak] Fix when the streak is ended and now QSO is logged after that --- application/models/Dayswithqso_model.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/models/Dayswithqso_model.php b/application/models/Dayswithqso_model.php index 1b1a0423d..cec3619e9 100644 --- a/application/models/Dayswithqso_model.php +++ b/application/models/Dayswithqso_model.php @@ -137,7 +137,11 @@ class Dayswithqso_model extends CI_Model } } - + if ($dateprev == $datecurr) { + $streaks[$i]['highstreak'] = $streak; + $streaks[$i]['endstreak'] = $endstreak->format('Y-m-d'); + $streaks[$i]['beginstreak'] = $endstreak->sub(new DateInterval('P'.($streak-1).'D'))->format('Y-m-d'); + } if (isset($streaks) && is_array($streaks)) { usort($streaks, array($this,'compareStreak')); // Sort array, highest streak first