mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
- fix: new tasks counter failed for newly created lists
This commit is contained in:
parent
ab9f398d7b
commit
1efbe606fd
1 changed files with 2 additions and 4 deletions
|
|
@ -260,7 +260,7 @@ class TasksController extends ApiController {
|
|||
checkReadAccess();
|
||||
$lists = $this->req->jsonBody['lists'] ?? [];
|
||||
if (!is_array($lists)) $lists = [];
|
||||
$userLists = [];
|
||||
$userLists = []; // [string]
|
||||
if (!haveWriteAccess()) {
|
||||
$userLists = $this->getUserListsSimple(true);
|
||||
if ($userLists) {
|
||||
|
|
@ -273,9 +273,7 @@ class TasksController extends ApiController {
|
|||
}
|
||||
$sqlWhereList = [];
|
||||
foreach ($lists as $item) {
|
||||
if (!isset($item['later'])) continue;
|
||||
$later = (int)$item['later'];
|
||||
if ($later <= 0) continue;
|
||||
$later = (int) ($item['later'] ?? 0);
|
||||
$sqlWhereList[] = "(list_id = ". (int)$item['listId']. " AND compl=0 AND d_created > $later)";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue