Update task query logic to handle status 6 and adjust file metadata in sync cache

This commit is contained in:
2024-12-15 16:37:43 +01:00
parent 8c42e65d57
commit 105438c249
2 changed files with 24 additions and 22 deletions

View File

@@ -28,8 +28,8 @@
}, },
"class.Cron.php": { "class.Cron.php": {
"type": "-", "type": "-",
"size": 8901, "size": 8953,
"lmtime": 1731744712286, "lmtime": 1734257236203,
"modified": false "modified": false
}, },
"class.DbModel.php": { "class.DbModel.php": {
@@ -101,8 +101,8 @@
}, },
"class.Tasks.php": { "class.Tasks.php": {
"type": "-", "type": "-",
"size": 12527, "size": 12995,
"lmtime": 0, "lmtime": 1734256610087,
"modified": false "modified": false
}, },
"class.Users.php": { "class.Users.php": {
@@ -145,14 +145,14 @@
}, },
"class.Tasks.php": { "class.Tasks.php": {
"type": "-", "type": "-",
"size": 15215, "size": 15492,
"lmtime": 0, "lmtime": 1734256285480,
"modified": false "modified": false
}, },
"class.Users.php": { "class.Users.php": {
"type": "-", "type": "-",
"size": 1709, "size": 1984,
"lmtime": 0, "lmtime": 1734256814274,
"modified": false "modified": false
}, },
"class.Wiki.php": { "class.Wiki.php": {
@@ -197,20 +197,20 @@
"layout": { "layout": {
"style.css": { "style.css": {
"type": "-", "type": "-",
"size": 17483, "size": 17553,
"lmtime": 1733781023546, "lmtime": 1734256875551,
"modified": false "modified": false
}, },
"style.css.map": { "style.css.map": {
"type": "-", "type": "-",
"size": 31297, "size": 31418,
"lmtime": 1733781023546, "lmtime": 1734256875551,
"modified": false "modified": false
}, },
"style.scss": { "style.scss": {
"type": "-", "type": "-",
"size": 21708, "size": 21800,
"lmtime": 1733781023371, "lmtime": 1734256875410,
"modified": false "modified": false
} }
}, },
@@ -470,26 +470,26 @@
}, },
"main_view.php": { "main_view.php": {
"type": "-", "type": "-",
"size": 21924, "size": 22533,
"lmtime": 0, "lmtime": 1734256586048,
"modified": false "modified": false
}, },
"task_edit.php": { "task_edit.php": {
"type": "-", "type": "-",
"size": 7644, "size": 7649,
"lmtime": 1733306421880, "lmtime": 1734256866399,
"modified": false "modified": false
}, },
"task_popup.php": { "task_popup.php": {
"type": "-", "type": "-",
"size": 5209, "size": 5214,
"lmtime": 1733745432733, "lmtime": 1734256307848,
"modified": false "modified": false
}, },
"task_single.php": { "task_single.php": {
"type": "-", "type": "-",
"size": 2861, "size": 2866,
"lmtime": 1733745438165, "lmtime": 1734256298399,
"modified": false "modified": false
}, },
"work-time.php": { "work-time.php": {

View File

@@ -132,6 +132,8 @@ class Tasks
{ {
if ( in_array( $status, [ 0, 2, 3 ] ) ) 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 ); $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 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 ); $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 );
} }