From 75ecc89e989f84d8438ac5d034bdffda386103a1 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Thu, 11 May 2023 13:58:18 +0800 Subject: [PATCH] * Delete a one-time todo. --- module/todo/tao.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/todo/tao.php b/module/todo/tao.php index c889f2b8ee..b71d33439c 100644 --- a/module/todo/tao.php +++ b/module/todo/tao.php @@ -315,7 +315,12 @@ class todoTao extends todoModel $specifiedDate = $todo->config->specify->month + 1 . '-' . $todo->config->specify->day; /* If not set cycle every year and have data, continue. */ - if(!empty($lastCycle) and !isset($todo->config->cycleYear)) return false; + if(!empty($lastCycle) and !isset($todo->config->cycleYear)) + { + /* Delete a one-time todo. */ + $this->todo->delete(TABLE_TODO, $todo->id); + return false; + } /* If set specified date, only judge month and day. */ if(date('m-d', strtotime($date)) != $specifiedDate) return false; }