From 105438c2496da3fc209935bd0c039f95d4f5b330 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Sun, 15 Dec 2024 16:37:43 +0100 Subject: [PATCH] Update task query logic to handle status 6 and adjust file metadata in sync cache --- .vscode/ftp-kr.sync.cache.json | 44 ++++++++++++++++---------------- autoload/factory/class.Tasks.php | 2 ++ 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/.vscode/ftp-kr.sync.cache.json b/.vscode/ftp-kr.sync.cache.json index 74bf552..2406861 100644 --- a/.vscode/ftp-kr.sync.cache.json +++ b/.vscode/ftp-kr.sync.cache.json @@ -28,8 +28,8 @@ }, "class.Cron.php": { "type": "-", - "size": 8901, - "lmtime": 1731744712286, + "size": 8953, + "lmtime": 1734257236203, "modified": false }, "class.DbModel.php": { @@ -101,8 +101,8 @@ }, "class.Tasks.php": { "type": "-", - "size": 12527, - "lmtime": 0, + "size": 12995, + "lmtime": 1734256610087, "modified": false }, "class.Users.php": { @@ -145,14 +145,14 @@ }, "class.Tasks.php": { "type": "-", - "size": 15215, - "lmtime": 0, + "size": 15492, + "lmtime": 1734256285480, "modified": false }, "class.Users.php": { "type": "-", - "size": 1709, - "lmtime": 0, + "size": 1984, + "lmtime": 1734256814274, "modified": false }, "class.Wiki.php": { @@ -197,20 +197,20 @@ "layout": { "style.css": { "type": "-", - "size": 17483, - "lmtime": 1733781023546, + "size": 17553, + "lmtime": 1734256875551, "modified": false }, "style.css.map": { "type": "-", - "size": 31297, - "lmtime": 1733781023546, + "size": 31418, + "lmtime": 1734256875551, "modified": false }, "style.scss": { "type": "-", - "size": 21708, - "lmtime": 1733781023371, + "size": 21800, + "lmtime": 1734256875410, "modified": false } }, @@ -470,26 +470,26 @@ }, "main_view.php": { "type": "-", - "size": 21924, - "lmtime": 0, + "size": 22533, + "lmtime": 1734256586048, "modified": false }, "task_edit.php": { "type": "-", - "size": 7644, - "lmtime": 1733306421880, + "size": 7649, + "lmtime": 1734256866399, "modified": false }, "task_popup.php": { "type": "-", - "size": 5209, - "lmtime": 1733745432733, + "size": 5214, + "lmtime": 1734256307848, "modified": false }, "task_single.php": { "type": "-", - "size": 2861, - "lmtime": 1733745438165, + "size": 2866, + "lmtime": 1734256298399, "modified": false }, "work-time.php": { diff --git a/autoload/factory/class.Tasks.php b/autoload/factory/class.Tasks.php index 88abc23..8726c41 100644 --- a/autoload/factory/class.Tasks.php +++ b/autoload/factory/class.Tasks.php @@ -132,6 +132,8 @@ class Tasks { if ( in_array( $status, [ 0, 2, 3 ] ) ) $results = $mdb -> query( 'SELECT * FROM tasks WHERE status = ' . $status . ' ' . $sql . ' ORDER BY date_end IS NOT NULL DESC, date_end ASC, name ASC' ) -> fetchAll( \PDO::FETCH_ASSOC ); + elseif ( $status == 6 ) + $results = $mdb -> query( 'SELECT * FROM tasks WHERE status = ' . $status . ' ' . $sql . ' ORDER BY open DESC, date_end IS NOT NULL DESC, date_end ASC, name ASC' ) -> fetchAll( \PDO::FETCH_ASSOC ); else $results = $mdb -> query( 'SELECT * FROM tasks WHERE status = ' . $status . ' ' . $sql . ' ORDER BY open DESC, o ASC, status ASC, date_start IS NOT NULL DESC, date_start ASC, date_end IS NOT NULL DESC, date_end ASC, name ASC' ) -> fetchAll( \PDO::FETCH_ASSOC ); }