summaryrefslogtreecommitdiff
path: root/plugins/tasklist/drivers/database/tasklist_database_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/tasklist/drivers/database/tasklist_database_driver.php')
-rw-r--r--plugins/tasklist/drivers/database/tasklist_database_driver.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/tasklist/drivers/database/tasklist_database_driver.php b/plugins/tasklist/drivers/database/tasklist_database_driver.php
index 8ad776a..3c5ad38 100644
--- a/plugins/tasklist/drivers/database/tasklist_database_driver.php
+++ b/plugins/tasklist/drivers/database/tasklist_database_driver.php
@@ -286,7 +286,7 @@ class tasklist_database_driver extends tasklist_driver
if ($filter['mask'] & tasklist::FILTER_MASK_COMPLETE)
$sql_add .= ' AND complete=1';
- else // don't show complete tasks by default
+ else if (empty($filter['since'])) // don't show complete tasks by default
$sql_add .= ' AND complete<1';
if ($filter['mask'] & tasklist::FILTER_MASK_FLAGGED)
@@ -301,6 +301,10 @@ class tasklist_database_driver extends tasklist_driver
$sql_add = 'AND (' . join(' OR ', $sql_query) . ')';
}
+ if ($filter['since'] && is_numeric($filter['since'])) {
+ $sql_add .= ' AND changed >= ' . $this->rc->db->quote(date('Y-m-d H:i:s', $filter['since']));
+ }
+
$tasks = array();
if (!empty($list_ids)) {
$result = $this->rc->db->query(sprintf(