FIX: Remove link between categories and project when deleting

This commit is contained in:
Supermanu 2019-05-04 12:22:45 +02:00
parent 648b2506ab
commit 9aed9359ad

View File

@ -688,6 +688,18 @@ class Project extends CommonObject
}
}
// Remove linked categories.
if (! $error) {
$sql = "DELETE FROM ".MAIN_DB_PREFIX. "categorie_project";
$sql.= " WHERE fk_project = ". $this->id;
$result = $this->db->query($sql);
if (! $result) {
$error++;
$this->errors[] = $this->db->lasterror();
}
}
// Fetch tasks
$this->getLinesArray($user);