Tasks: Remove redundant query in database driver

This commit is contained in:
Aleksander Machniak 2019-09-27 21:35:54 +02:00
parent 7ab61e36aa
commit 3ae775b8c2

View file

@ -185,13 +185,6 @@ class tasklist_database_driver extends tasklist_driver
$list_id = $prop['id'];
if ($this->lists[$list_id]) {
// delete all tasks linked with this list
$this->rc->db->query(
"DELETE FROM " . $this->db_tasks . " WHERE `tasklist_id` = ?",
$list_id
);
// delete list record
$query = $this->rc->db->query(
"DELETE FROM " . $this->db_lists . " WHERE `tasklist_id` = ? AND `user_id` = ?",
$list_id,
@ -209,6 +202,7 @@ class tasklist_database_driver extends tasklist_driver
*
* @param string Search string
* @param string Section/source to search
*
* @return array List of tasklists
*/
public function search_lists($query, $source)